-
Notifications
You must be signed in to change notification settings - Fork 482
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] Add Support for Selecting Fields in TraceQL #2175
Comments
Thank you for filing this issue! We've discussed the concept of select some internally. I'd like to add it to the language, but I'd like some community input on designing this new feature in traceql.
I feel like you're conflating trace level fields with span level fields. If we add a select operation it will target span level fields.
I'm a proponent of adding it into the language itself. Perhaps something like:
Can you double check the values returned? The API should be returning the value of
will "trick" the engine into returning values for |
@joe-elliott Thank you for the articulation, the language you use is easier to understand the target use cases.
You are absolutely right.
I agree, adding the
After reading over the Tempo Documentation again, I am realizing that I am unable to replicate the "Example of a TraceQL search" example with |
This is working for me locally. I believe this would work on a Tempo 2.0 cluster started with defaults.
|
I am also interested in this feature being added as I have a use case where I will have to use the work around (I am so glad I found this thread, this would have been a very difficult issue to solve otherwise!). I just wanted to add that in my case I would want the value to be shown as a top (trace) level and also span level attribute, although I understand that it may be hard to please everyone! |
I'm actually going to start work on this "next". Looking to have something in the next couple months.
How do you see this working? If I do a query like:
the values of Also, any thoughts/comments on the proposed syntax? |
Great stuff! Otherwise the syntax looks good to me, would you use && connectors for multiple attribute selects? for example |
Adding a "trace scope" is on our list of things to do. Then you'd be able to write something like:
We would likely use commas since it's a list of attributes:
I have thought about ways to select the root span but was thinking more along the lines of:
Adding root span attributes to a "trace" scope is compelling. |
Related to the discussion on #1989, and continuing @mdisibio comment: I think that adding the root span attributes to the trace scope is kind of weird... It's a little bit out of the scope (get it? 😉) of this issue though... so maybe we shouldn't get into this conversation over here 🙃 Anyway, +1 from me about the |
Is your feature request related to a problem? Please describe.
The current Search API endpoint returns 5 useful fields for each trace:
traceID
,rootServiceName
,rootTraceName
,startTimeUnixNano
, anddurationMs
. When doing analysis on large amounts of traces, it can be very useful to get an additional field or two per trace, instead of parsing it out of the full trace via the Query Trace API. For example, one of my current use cases involves logging both therootServiceName
and thespan.http.target
fields.Describe the solution you'd like
To modify the Search API endpoint to allow extra fields to be returned alongside the 5 fields it returns right now. This could be configured via a
select
statement in TraceQL or via a tag in tag-based search.Describe alternatives you've considered
I can get the Tempo UI to show this information by including a TraceQL clause like
span.http.target != ""
to see the field value forspan.http.target
when I drill into a trace, but this does not work via API.Additional context
The text was updated successfully, but these errors were encountered: