fix(tempo): expose intrinsic span fields in /api/v2/search/tags#175
Open
vshulakov-sh wants to merge 1 commit into
Open
fix(tempo): expose intrinsic span fields in /api/v2/search/tags#175vshulakov-sh wants to merge 1 commit into
vshulakov-sh wants to merge 1 commit into
Conversation
Intrinsic span fields (name, kind, status, duration) have no attribute prefix, so they were skipped during the field_names tag discovery, and requesting scope=intrinsic returned an error. As a result the intrinsic scope of the Tempo /api/v2/search/tags response was always empty and these fields did not appear in the Grafana Traces Drilldown attribute breakdown. Advertise a static "intrinsic" scope listing the intrinsics that VictoriaTraces can filter and group by, and support scope=intrinsic.
29f4d57 to
5032352
Compare
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.
Describe Your Changes
Intrinsic span fields (
name,kind,status,duration) were missing from theintrinsicscope of the Tempo/api/v2/search/tagsendpoint, so they did not appear in the Grafana Traces Drilldown attribute breakdown.Two reasons they were absent:
resource_attr:/span_attr:), so thefield_namestag-discovery loop insearchTags()skipped them.scope=intrinsicexplicitly returnedscope: intrinsic is not supported yet.This change advertises a static
intrinsicscope listing the intrinsics that VictoriaTraces can actually filter and group by (name→NameField,kind→KindField,status→StatusCodeField,duration→DurationField), matching Tempo's response shape. The list is included in thescope=all/ empty-scope response and returned directly forscope=intrinsic(no storage scan needed, since intrinsics are a fixed set). With this, Grafana Traces Drilldown listsname/kind/statusin the breakdown, consistent with real Tempo.Verified against a real Tempo instance: its
/api/v2/search/tagsreturns these names under anintrinsicscope. Added unit tests covering thescope=intrinsicpath and the response shape.Checklist
The following checks are mandatory:
Summary by cubic
Expose intrinsic span fields (
name,kind,status,duration) in Tempo/api/v2/search/tagsand addscope=intrinsic. This lets Grafana Traces Drilldown show and use them for filtering/grouping.intrinsicscope with these fields; include it inscope=alland empty-scope responses.intrinsicscope in the response and wire it through the handler.scope=intrinsicand the response shape; update changelog.Written for commit 5032352. Summary will update on new commits.