Skip to content

feat(metrics): Add metric user attributes from scope#1063

Open
szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/metrics-defaults-scopedfrom
szokeasaurusrex/user-attributes-metrics
Open

feat(metrics): Add metric user attributes from scope#1063
szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/metrics-defaults-scopedfrom
szokeasaurusrex/user-attributes-metrics

Conversation

@szokeasaurusrex
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex commented Apr 16, 2026

Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set user.* metric attributes instead of overwriting them.

Stacked on #1062

Co-authored-by: Joris Bayer joris.bayer@sentry.io
Closes #1060
Closes RUST-188

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 16, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against aeedb59

@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from efcf784 to 8a5dd6f Compare April 16, 2026 19:48
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from 3ab9f68 to 948a361 Compare April 16, 2026 19:48
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review April 16, 2026 19:57
@szokeasaurusrex szokeasaurusrex requested a review from lcian as a code owner April 16, 2026 19:57
Comment thread sentry-core/src/scope/real.rs
Copy link
Copy Markdown
Member

@lcian lcian left a comment

Choose a reason for hiding this comment

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

LGTM

szokeasaurusrex added a commit that referenced this pull request Apr 21, 2026
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 8a5dd6f to 2b6b592 Compare April 21, 2026 12:40
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from 948a361 to aa6f863 Compare April 21, 2026 12:41
szokeasaurusrex added a commit that referenced this pull request Apr 21, 2026
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 2b6b592 to 092db6b Compare April 21, 2026 12:46
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from aa6f863 to eece55d Compare April 21, 2026 12:47
szokeasaurusrex added a commit that referenced this pull request Apr 21, 2026
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 092db6b to 9838831 Compare April 21, 2026 15:20
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from eece55d to 787d60a Compare April 21, 2026 15:20
cursor[bot]

This comment was marked as low quality.

szokeasaurusrex added a commit that referenced this pull request Apr 22, 2026
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 9838831 to 60371a2 Compare April 22, 2026 17:49
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from 787d60a to 807de4c Compare April 22, 2026 17:49
szokeasaurusrex added a commit that referenced this pull request Apr 23, 2026
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 60371a2 to 7f844e8 Compare April 23, 2026 20:54
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from 807de4c to 28bf132 Compare April 23, 2026 20:54
szokeasaurusrex added a commit that referenced this pull request Apr 23, 2026
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 7f844e8 to 208b3ae Compare April 23, 2026 21:21
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from 28bf132 to aab78c9 Compare April 23, 2026 21:21
Add the metric user attribute portion of the earlier enrichment work.

Pass send_default_pii into metric scope application and attach user.id, user.name, and user.email from the scope when that option is enabled. Preserve explicitly set `user.*` metric attributes instead of overwriting them.

Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
Closes #1060
Closes [RUST-188](https://linear.app/getsentry/issue/RUST-188/add-trace-metric-user-attribute-enrichment-gated-by-send-default-pii)
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/metrics-defaults-scoped branch from 208b3ae to f30b17a Compare April 23, 2026 21:25
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/user-attributes-metrics branch from aab78c9 to aeedb59 Compare April 23, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants