-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TraceQL: Support select() on multiple scopes #4311
Comments
Moved to https://github.com/grafana/tempo since this is a TraceQL feature request. |
Hi @farcaller. Have you tried using union structural operators? It returns the matching spans of both selectors. |
I really like this idea. The ability to select (or even just reference) the attributes from other spans. The original TraceQL design actually included this with the concept of parent:
but we've struggled to build it into the language due to storage level issues. I would not give up hope tho! I want this as well, but it is definitely not a current focus of the team. |
I don't think that's semantically the same. The result is both spans and I can |
Agreed. I was going to suggest experimenting with using Grafana tables and transformations to link the two up, but while you can |
It just occurred to me that you can do this with the nested set values. I know we're in super hacky territory here. I acknowledge this isn't a "real" solution but it would be interesting to see how well it would work. A parent span can be identified if nestedSetLeft = nestedSetParent In this screenshot you can see the queried span has two children. |
Agree it would be awesome to have more capabilities in this area of selecting/organizing output. The original idea of selecting on multiple spanset filters I'm thinking hits up against more limits in the language other than the parsing. Spanset operators returns the right-hand-side, so a query like |
Why is this needed:
select()
allows you to visualize the attributes of the span, making them easier to visually compare. However, it's not possible to select anything from parent scopes if the final selected span doesn't provide enough context.What would you like to be added:
Consider the following traces:
You can select all the world spans within helloes and add the column for message via
{ span:name = "hello" } >> { span:name = "world" } | select(span.message)
, however you can't add thesender
of the parent span to vizualisation.I don't know how the syntax for this should look like. My naive expectation is that
{ span:name = "hello" } | select(span.sender) >> { span:name = "world" } | select(span.message)
would create a table with both sender and message columns.Who is this feature for?
This is useful when you're analyzing the issue stretching across several nested spans, you narrowed it down to the specific parent-child spans and want to see the attributes in play.
The text was updated successfully, but these errors were encountered: