TraceQL - Add support for scoped intrinsics using : - #3629
Merged
Conversation
ie-pham
marked this pull request as ready for review
May 1, 2024 01:36
ie-pham
requested review from
annanay25,
electron0zero,
joe-elliott,
knylander-grafana,
mapno,
mdisibio,
stoewer,
yvrhdn and
zalegrala
as code owners
May 1, 2024 01:36
| possible to span-level intrinsics. | ||
| {{% /admonition %}} | ||
|
|
||
| ### Scoped Intrinsic Fields |
Contributor
There was a problem hiding this comment.
Changing this to sentence case to match our style
Suggested change
| ### Scoped Intrinsic Fields | |
| ### Scoped intrinsic fields |
joe-elliott
reviewed
May 1, 2024
joe-elliott
left a comment
Collaborator
There was a problem hiding this comment.
looking good! a few comments but this is close to mergeable.
after this is merged please also file an issue in github.com/grafana/grafana requesting support for the new intrinsics. let me know and i will help you tag it correctly.
| // trace: | ||
| TRACE_COLON IDURATION { $$ = NewIntrinsic(IntrinsicTraceDuration) } | ||
| | TRACE_COLON ROOTNAME { $$ = NewIntrinsic(IntrinsicTraceRootSpan) } | ||
| | TRACE_COLON ROOTSERVICENAME { $$ = NewIntrinsic(IntrinsicTraceRootService) } |
Collaborator
There was a problem hiding this comment.
let's add a new token and do trace:rootService like we spec'ed out here:
joe-elliott
approved these changes
May 2, 2024
joe-elliott
left a comment
Collaborator
There was a problem hiding this comment.
asking for one small comment added, but otherwise lgtm.
great work!
| attribute: | ||
| intrinsicField { $$ = $1 } | ||
| | attributeField { $$ = $1 } | ||
| intrinsicField { $$ = $1 } |
Collaborator
There was a problem hiding this comment.
can we add a comment above the intrinsicField definition that we are no longer adding these?
joe-elliott
pushed a commit
to joe-elliott/tempo
that referenced
this pull request
May 7, 2024
* add scoped intrinsics support : * lint * test & changelog * more test & changelog & doc * rename * add comment
mattdurham
pushed a commit
to mattdurham/tempo
that referenced
this pull request
Jun 18, 2026
* add scoped intrinsics support : * lint * test & changelog * more test & changelog & doc * rename * add comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does: Add support for scoped intrinsics using
:. Users can now make queries like so:{span:duration > 100ms}. Which is different from{span.duration > 100ms}as the:signifies that we are looking at the duration of the span where as the.will signify that it is an attribute namedurationof a span.This is the change will allow us to additionally features to Traceql like
trace:idandlink:spanIdin the future.Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]