Skip to content

ref(trace-details): Remove replacement attribute filtering when conventions flag is off#114944

Draft
obostjancic wants to merge 5 commits intomasterfrom
obostjancic/ref/remove-replacement-attribute-filtering
Draft

ref(trace-details): Remove replacement attribute filtering when conventions flag is off#114944
obostjancic wants to merge 5 commits intomasterfrom
obostjancic/ref/remove-replacement-attribute-filtering

Conversation

@obostjancic
Copy link
Copy Markdown
Member

@obostjancic obostjancic commented May 6, 2026

Summary

  • Stacked on fix(trace-details): Show replacement attributes when no deprecated source exists #114943
  • Removes the is_sentry_convention_replacement_attribute filtering entirely from the else branch (when use_sentry_conventions is off)
  • With the conventions flag at 0% rollout, this filtering was the sole cause of replacement attributes being invisible in span details
  • Showing both deprecated and new names (minor duplication) is better than silently dropping data

…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 <[email protected]>
@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 obostjancic marked this pull request as draft May 6, 2026 07:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Backend Test Failures

Failures on 24e6486 in this run:

tests/snuba/api/endpoints/test_project_trace_item_details.py::ProjectTraceItemDetailsEndpointTest::test_simple_using_spans_item_typelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/snuba/api/endpoints/test_project_trace_item_details.py:259: in test_simple_using_spans_item_type
    assert trace_details_response.data["attributes"] == [
E   AssertionError: assert [{'name': 'is...144.287}, ...] == [{'name': 'is...1.8e+03}, ...]
E     
E     At index 2 diff: {'name': 'http.response.body.size', 'type': 'float', 'value': 100.0} != {'name': 'http.response_content_length', 'type': 'float', 'value': 100.0}
E     Left contains one more item: {'name': 'transaction.span_id', 'type': 'str', 'value': '56157853078e4bc7'}
E     
E     Full diff:
E       [
E           {
E               'name': 'is_transaction',
E               'type': 'bool',
E               'value': False,
E           },
E           {
E               'name': 'code.lineno',
E               'type': 'float',
E               'value': 420.0,
E           },
E           {
E     +         'name': 'http.response.body.size',
E     +         'type': 'float',
E     +         'value': 100.0,
E     +     },
E     +     {
E               'name': 'http.response_content_length',
E               'type': 'float',
E               'value': 100.0,
E           },
E           {
E               'name': 'precise.finish_ts',
E               'type': 'float',
E     -         'value': 1778054144.287 ± 1.8e+03,
E     ?                           ^    ----------
E     +         'value': 1778054145.287,
E     ?                           ^
E           },
E           {
E               'name': 'precise.start_ts',
E               'type': 'float',
E     -         'value': 1778054144.287 ± 1.8e+03,
E     ?                                ----------
E     +         'value': 1778054144.287,
E           },
E           {
E               'name': 'received',
E               'type': 'float',
E     -         'value': 1778054144.287 ± 1.8e+03,
E     ?                                ----------
... (68 more lines)

Base automatically changed from obostjancic/fix/span-details-missing-replacement-attributes to master May 6, 2026 08:50
…ntions flag is off

Stop filtering out replacement attributes when use_sentry_conventions is
off. The filtering was meant to avoid showing both deprecated and new
attribute names, but with the conventions flag at 0% rollout it caused
all replacement attributes to be invisible. Showing both names (minor
duplication) is better than silently dropping data.

Co-Authored-By: Claude Opus 4 <[email protected]>
@obostjancic obostjancic force-pushed the obostjancic/ref/remove-replacement-attribute-filtering branch from c7f3996 to e042ad9 Compare May 6, 2026 09:16
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.

1 participant