-
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] Support ScopeSpans scope #2189
Comments
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. |
Maybe I can have a go at it? |
No new intrinsic fields to be added for this work. Going by OTL's InstrumentationScope, it has name and version as intrinsic properties and set of customizable attributes already. Also, going through OTL's documentation, I see ScopeSpan has InstrumentationScope as a member. So objective of this work is to make traces searchable based on InstrumentationScope's name, version or any of its attribute. |
I believe we need at least A good first step to implementing this feature will be adding support for scope attributes to the schema. We currently store the name/version but drop the attributes because they were added later. tempo/tempodb/encoding/vparquet2/schema.go Lines 165 to 168 in fbe20b7
So for step 1, let's just add the attributes to the schema and correctly encode them here https://github.com/grafana/tempo/blob/main/tempodb/encoding/vparquet2/schema.go#L243 and decode them here: https://github.com/grafana/tempo/blob/main/tempodb/encoding/vparquet2/schema.go#L526 |
This would need modification in: tempo/pkg/tempopb/common/v1/common.pb.go Lines 398 to 402 in c633387
A new field to capture array of Attribute needs to be added. |
So it has occurred to me that this will require a new Parquet version. This change can not be done in line to the existing vParquet2 encoding. Also, we already have a team working on vParquet3 with some nice perfomance improvements. I think this work is blocked until after vParquet3 is cut. |
@joe-elliott Does this issue include supporting searching other intrinsic fields, like I'd like to +1 whatever issue makes status.message/code searchable :) |
@Bruno-DaSilva If you're referring to the span status: The code is already searchable:
The message however is not. Created an issue to track: |
I'm not sure if this has been mentioned, but InstrumentationScope now contains arbitrary attributes. These need to be accommodated in both TraceQL and the new block format. message InstrumentationScope {
// An empty instrumentation scope name means the name is unknown.
string name = 1;
string version = 2;
// Additional attributes that describe the scope. [Optional].
// Attribute keys MUST be unique (it is not allowed to have more than one
// attribute with the same key).
repeated KeyValue attributes = 3;
uint32 dropped_attributes_count = 4;
} |
Is your feature request related to a problem? Please describe.
Since TraceQL was designed InstrumentationLibrarySpans was renamed ScopeSpans. Also attributes and intrinsics exist at this level.
Add support for querying these fields.
Before starting on this work we need to define how to address this particular scope. For instance traditionally intrinsics are accessed without scope:
{ name = "foo" }
and attributes are accessed with scope:
{ span.bar = "foo" }
We need to decide how to access intrinsics outside of the span scope. Consider
{ instrumentation.version = "1.0" }
to access the instrumentation's intrinsic version. How will we distinguish between this and an attribute named "version" at the instrumentation level? Should we keep with the pattern that intrinsics are unscoped and do something like?
{ instrumentation_version = "1.0" }
The text was updated successfully, but these errors were encountered: