-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add jaeger rest endpoints for grafana tracing support (#4197)
* feat: add jaeger rest endpoints for grafana tracing support * chore: minor enhancements, add a couple of tests * chore: use require helper method for optional jaeger parameter * chore: path renaming as per CR * chore: apply CR suggestions, small improvements * feat: add jaeger structs and helper methods * chore: add process, process_id handling logic * chore: add request param duration parsing logic * chore: minor style adjustments * chore: extract common logic into a method for traces * Review. * Make tests work. * chore: add tests * Refactor. * chore: add swagger docs * fix: remove go_parse_duration dependency, util.rs * chore: fix linting * Refactor parse duration for jaeger. * Clean. * chore: apply clippy suggestion * fix: add tags support * chore: apply clippy suggestions * chore: adjust the tag logic, add assertions for tags * Last commit before merging. * Remove collect_vec * Use bytes in jaeger models. --------- Co-authored-by: fmassot <[email protected]>
- Loading branch information
Showing
13 changed files
with
1,366 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 168 additions & 0 deletions
168
quickwit/quickwit-serve/resources/tests/jaeger_ui_trace.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
{ | ||
"traceID": "0000000000000001", | ||
"spans": [ | ||
{ | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000001", | ||
"operationName": "test-general-conversion", | ||
"references": [], | ||
"startTime": 1485467191639875, | ||
"duration": 5, | ||
"flags": 0, | ||
"tags": [], | ||
"logs": [ | ||
{ | ||
"timestamp": 1485467191639875, | ||
"fields": [ | ||
{ | ||
"key": "event", | ||
"type": "string", | ||
"value": "some-event" | ||
} | ||
] | ||
}, | ||
{ | ||
"timestamp": 1485467191639875, | ||
"fields": [ | ||
{ | ||
"key": "x", | ||
"type": "string", | ||
"value": "y" | ||
} | ||
] | ||
} | ||
], | ||
"processID": "p1", | ||
"warnings": [] | ||
}, | ||
{ | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000002", | ||
"operationName": "some-operation", | ||
"references": [], | ||
"flags": 0, | ||
"startTime": 1485467191639875, | ||
"duration": 5, | ||
"tags": [ | ||
{ | ||
"key": "peer.service", | ||
"type": "string", | ||
"value": "service-y" | ||
}, | ||
{ | ||
"key": "peer.ipv4", | ||
"type": "int64", | ||
"value": 23456 | ||
}, | ||
{ | ||
"key": "error", | ||
"type": "bool", | ||
"value": true | ||
}, | ||
{ | ||
"key": "temperature", | ||
"type": "float64", | ||
"value": 72.5 | ||
}, | ||
{ | ||
"key": "javascript_limit", | ||
"type": "int64", | ||
"value": "9223372036854775222" | ||
}, | ||
{ | ||
"key": "blob", | ||
"type": "binary", | ||
"value": "AAAwOQ==" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p1", | ||
"warnings": [] | ||
}, | ||
{ | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000003", | ||
"operationName": "some-operation", | ||
"flags": 0, | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000002" | ||
} | ||
], | ||
"startTime": 1485467191639875, | ||
"duration": 5, | ||
"tags": [], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": [] | ||
}, | ||
{ | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000004", | ||
"operationName": "reference-test", | ||
"flags": 0, | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "00000000000000ff", | ||
"spanID": "00000000000000ff" | ||
}, | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000002" | ||
}, | ||
{ | ||
"refType": "FOLLOWS_FROM", | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000002" | ||
} | ||
], | ||
"startTime": 1485467191639875, | ||
"duration": 5, | ||
"tags": [], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": [ | ||
"some span warning" | ||
] | ||
}, | ||
{ | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000005", | ||
"operationName": "preserveParentID-test", | ||
"flags": 0, | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "0000000000000001", | ||
"spanID": "0000000000000004" | ||
} | ||
], | ||
"startTime": 1485467191639875, | ||
"duration": 4, | ||
"tags": [], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": [ | ||
"some span warning" | ||
] | ||
} | ||
], | ||
"processes": { | ||
"p1": { | ||
"serviceName": "service-x", | ||
"key": "p1", | ||
"tags": [] | ||
}, | ||
"p2": { | ||
"serviceName": "service-y", | ||
"key": "p2", | ||
"tags": [] | ||
} | ||
}, | ||
"warnings": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (C) 2023 Quickwit, Inc. | ||
// | ||
// Quickwit is offered under the AGPL v3.0 and as commercial software. | ||
// For commercial licensing, contact us at [email protected]. | ||
// | ||
// AGPL: | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as | ||
// published by the Free Software Foundation, either version 3 of the | ||
// License, or (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
mod model; | ||
mod parse_duration; | ||
mod rest_handler; | ||
pub(crate) use rest_handler::{jaeger_api_handlers, JaegerApi}; |
Oops, something went wrong.