Skip to content

fix(trace-details): Show replacement attributes when no deprecated source exists#114943

Merged
obostjancic merged 4 commits intomasterfrom
obostjancic/fix/span-details-missing-replacement-attributes
May 6, 2026
Merged

fix(trace-details): Show replacement attributes when no deprecated source exists#114943
obostjancic merged 4 commits intomasterfrom
obostjancic/fix/span-details-missing-replacement-attributes

Conversation

@obostjancic
Copy link
Copy Markdown
Member

@obostjancic obostjancic commented May 6, 2026

Summary

  • Span details endpoint was silently dropping replacement attributes (e.g. gen_ai.usage.input_tokens, gen_ai.input.messages, gen_ai.output.messages) when the performance-sentry-conventions-fields flag was off (currently at 0% rollout)
  • The filtering assumed the deprecated name always exists alongside the new name, but once we get only the new names the data vanished
  • Now only filters out replacement attributes when their deprecated source is actually present in the response

…urce exists

When use_sentry_conventions is off, span details unconditionally hid all
replacement attributes (e.g. gen_ai.usage.input_tokens,
gen_ai.input.messages). This worked during migration when both old and
new names coexisted, but once SDKs send only the new names, the data
silently disappeared from the span detail view.

Now only filter out replacement attributes when their deprecated source
is actually present in the response.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@obostjancic obostjancic requested review from a team as code owners May 6, 2026 07:51
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 6, 2026
obostjancic and others added 2 commits May 6, 2026 09:56
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
deprecated_names = get_deprecated_source_internal_names(
external_name, trace_item_type
)
if any(name in all_internal_names for name in deprecated_names):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this is probably going to be an ever-growing list, we could opt for set intersection > 0 here instead, otherwise this for loop will keep taking longer and longer

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@obostjancic obostjancic requested a review from shellmayr May 6, 2026 08:11
@obostjancic obostjancic enabled auto-merge (squash) May 6, 2026 08:11
@obostjancic obostjancic merged commit 885764c into master May 6, 2026
61 checks passed
@obostjancic obostjancic deleted the obostjancic/fix/span-details-missing-replacement-attributes branch May 6, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants