Skip to content

fix(segment-enrichment): Propagate conventional user attributes#116492

Merged
mjq merged 1 commit into
masterfrom
mjq/propagate-user-attrs
May 29, 2026
Merged

fix(segment-enrichment): Propagate conventional user attributes#116492
mjq merged 1 commit into
masterfrom
mjq/propagate-user-attrs

Conversation

@mjq
Copy link
Copy Markdown
Member

@mjq mjq commented May 29, 2026

Currently v1 (transaction-based) spans send user attributes in sentry.user.* attributes, while v2 (streaming) spans send user attributes in conventions-defined user.* attributes. Only the v1 attributes are currently propagated, meaning that child spans from span streaming SDKs are missing user info.

We can use our conventions' deprecation mechanism (getsentry/sentry-conventions#406) to make queries backwards compatible, but that doesn't affect segment enrichment which reads data directly from spans.

For now, propagate both the old v1 user attributes and the new v2 user attributes to children. Once that's done, EAP's attribute coalescing (via above deprecation PR) will take care of the rest.

Next steps will be to clean up our use of the v1 sentry.user.* attributes in Relay and Sentry, at which point we can stop propagating them. (That work is tracked in BROWSE-535).

Fixes BROWSE-532.


🤖: Claude Code (Opus 4.6) used to generate the tests. I made the code changes and reviewed the tests. Words my own.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 29, 2026

BROWSE-532

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 29, 2026
Comment thread src/sentry/spans/consumers/process_segments/enrichment.py
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3472ebe. Configure here.

@mjq mjq marked this pull request as ready for review May 29, 2026 17:10
@mjq mjq requested review from a team as code owners May 29, 2026 17:10
@mjq mjq merged commit 297a20e into master May 29, 2026
66 checks passed
@mjq mjq deleted the mjq/propagate-user-attrs branch May 29, 2026 18:27
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.

2 participants