jaeger-ui icon indicating copy to clipboard operation
jaeger-ui copied to clipboard

Make the trace ID and span ID accessible to different types of link patterns

Open omallo opened this issue 4 years ago • 6 comments

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 types process, tags, logs.
  • [x] Introduce a new spanID field and make it accessible to link patterns of the types process, tags, logs.
  • [ ] Introduce a new link pattern type spans where the traceID and spanID 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?

omallo avatar May 16 '20 08:05 omallo

makes total sense, I'm surprised it's not the case already.

yurishkuro avatar May 16 '20 12:05 yurishkuro

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" }

image

I get the following warning in the console image

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

AndersLindPedersen avatar Jan 05 '21 21:01 AndersLindPedersen

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?).

bforbis avatar Feb 01 '23 17:02 bforbis

PRs are welcome.

yurishkuro avatar Feb 01 '23 17:02 yurishkuro

@yurishkuro @omallo I would like to work on this please assign

ashutosh887 avatar May 03 '23 02:05 ashutosh887

Feel free to work on it. We do not assign issues - https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md#assigning-issues

yurishkuro avatar May 04 '23 01:05 yurishkuro