Skip to content

fix(tempo): expose intrinsic span fields in /api/v2/search/tags#175

Open
vshulakov-sh wants to merge 1 commit into
VictoriaMetrics:masterfrom
vshulakov-sh:fix-tempo-search-tags-intrinsic-scope
Open

fix(tempo): expose intrinsic span fields in /api/v2/search/tags#175
vshulakov-sh wants to merge 1 commit into
VictoriaMetrics:masterfrom
vshulakov-sh:fix-tempo-search-tags-intrinsic-scope

Conversation

@vshulakov-sh

@vshulakov-sh vshulakov-sh commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Describe Your Changes

Intrinsic span fields (name, kind, status, duration) were missing from the intrinsic scope of the Tempo /api/v2/search/tags endpoint, so they did not appear in the Grafana Traces Drilldown attribute breakdown.

Two reasons they were absent:

  1. Intrinsic fields have no attribute prefix (unlike resource_attr: / span_attr:), so the field_names tag-discovery loop in searchTags() skipped them.
  2. Requesting scope=intrinsic explicitly returned scope: intrinsic is not supported yet.

This change advertises a static intrinsic scope listing the intrinsics that VictoriaTraces can actually filter and group by (nameNameField, kindKindField, statusStatusCodeField, durationDurationField), matching Tempo's response shape. The list is included in the scope=all / empty-scope response and returned directly for scope=intrinsic (no storage scan needed, since intrinsics are a fixed set). With this, Grafana Traces Drilldown lists name/kind/status in the breakdown, consistent with real Tempo.

Verified against a real Tempo instance: its /api/v2/search/tags returns these names under an intrinsic scope. Added unit tests covering the scope=intrinsic path 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/tags and add scope=intrinsic. This lets Grafana Traces Drilldown show and use them for filtering/grouping.

  • Bug Fixes
    • Return a static intrinsic scope with these fields; include it in scope=all and empty-scope responses.
    • Render the intrinsic scope in the response and wire it through the handler.
    • Add unit tests for scope=intrinsic and the response shape; update changelog.

Written for commit 5032352. Summary will update on new commits.

Review in cubic

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.
@vshulakov-sh vshulakov-sh force-pushed the fix-tempo-search-tags-intrinsic-scope branch from 29f4d57 to 5032352 Compare June 4, 2026 13:30

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant