jaeger-ui
jaeger-ui copied to clipboard
Make the trace ID and span ID accessible to different types of link patterns
Requirement - what kind of business use case are you trying to solve?
I would like to be able to link from the Jaeger UI to some log storage backend in order to search for logs of an individual span.
Note: This can already be done on a trace level but not on a span level.
Problem - what in Jaeger blocks you from solving the requirement?
The Jaeger UI provides different types of link patterns but the span ID seems not to be exposed and the trace ID is only exposed for links of type traces
.
Proposal - what do you suggest to solve the problem or improve the existing situation?
In order to accommodate my specific use case, and maybe also others, I would suggest the following extensions to the Jaeger UI:
- [x] Make the already existing
traceID
field also accessible to link patterns of the typesprocess
,tags
,logs
. - [x] Introduce a new
spanID
field and make it accessible to link patterns of the typesprocess
,tags
,logs
. - [ ] Introduce a new link pattern type
spans
where thetraceID
andspanID
fields are accessible (and maybe also other span specific data). Links of this type would be shown on the span level (e.g. next to the existing "deep link").
Note: The proposed solution goes beyond my specific use case but it might enable other use cases as well.
Any open questions to address
Does the proposed solution make sense for the members of the project?
makes total sense, I'm surprised it's not the case already.
I am using the asp.net core Jaeger Exporter, which does not add a "traces" metadata group to jaeger. Is this a bug in the asp.net core Jaeger exporter, or related to this issue?
Been trying to setup LinkPattern on the "tags" group witout any luck:
{ "type": "tags", "key": "http.host", "url": "http://example111.com/?traceID=#{traceID}", "text": "See logs for this trace in Humio" }
I get the following warning in the console
Looking at link-patterns.tsx, it seems like this will only work if the traceId or spanId is exposed as a key in either the process or tags group? https://github.com/jaegertracing/jaeger-ui/blob/6827f700f9e5bc85c2db23493f7e37730f39e865/packages/jaeger-ui/src/model/link-patterns.tsx#L116
I would also like to add that having a spanStartTime
and spanEndTime
would be useful to include for patterns of type process
, tags
, and logs
.
The use case I have is that I have an ElasticSearch documentID as a tag in my span, but it would be very useful to also know the timestamps as it will let me create a deep link directly to the ES daily index that contains that ES document without having to search across a potentially large date range (equal to the jaeger trace retention period?).
PRs are welcome.
@yurishkuro @omallo I would like to work on this please assign
Feel free to work on it. We do not assign issues - https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md#assigning-issues