Can I create a TraceQL query that filters based on referenced linked spans? #3656
Unanswered
siegenthalerroger
asked this question in
Q&A
Replies: 1 comment 1 reply
-
We do have some plans to support links detailed here, but they do not include structural operators "through" the link. It would be quite difficult to achieve this b/c a linked span would require doing a full search of the database for the trace id. I'm not sure how to do it efficiently. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We run a event-based microservice system in which we'd want to be able to query traces based on the attributes of a trace from another system. According to the OTEL semantic conventions for distributed traces the traces from each microservice are linked to each other with a referenced linked span. In Grafana this is visually displayed quite nicely.
Now it would be nice to be able to query Tempo to find all traces that are referenced from a trace with a certain name/attributes. I thought that this would be possible with the structural operators but I can't see any operator for referenced spans. Currently finding all traces that were initiated from one action requires how the systems interact, for each possible action. This doesn't really scale with an increasing number of microservices and async interactions.
Following examples are things that I'd like to be able to do:
Finding the source trace of a trace.
<-
would mean something like "left spanset contains any span that is referenced by any span in the right spanset"Finding the absolute origin of a chain of traces.
<*
would mean "left spanset contains all spans that are referenced by any span in the right spanset recursively"Finding all spans that are "spawned" from a trace.
->
would mean "right spanset contains any spansets that reference the left spanset"This last one is probably impossible to achieve in a performance-optimal way, considering that the spans only reference eachother in the opposite direction. However for our usecase the time-performance isn't that relevant tbh.
Beta Was this translation helpful? Give feedback.
All reactions