Add metric enrichment behavior in sentry-core so emitted metrics include trace/span association and default SDK attributes, and include user.id, user.name, and user.email only when send_default_pii is enabled. Attribute merges should preserve explicitly set metric attributes.
Scope
Apply the relevant logic from #997 where useful, focused on sentry-core/src/scope/real.rs, sentry-core/src/scope/noop.rs, and sentry-core/src/client.rs, aligned with default attributes, user attributes, and tracing association. Include tests for send_default_pii gating and non-overwrite behavior. If code is reused from #997, include Co-authored-by: Joris Bayer <joris.bayer@sentry.io> in commit trailers.
Add metric enrichment behavior in
sentry-coreso emitted metrics include trace/span association and default SDK attributes, and includeuser.id,user.name, anduser.emailonly whensend_default_piiis enabled. Attribute merges should preserve explicitly set metric attributes.Scope
Apply the relevant logic from #997 where useful, focused on
sentry-core/src/scope/real.rs,sentry-core/src/scope/noop.rs, andsentry-core/src/client.rs, aligned with default attributes, user attributes, and tracing association. Include tests forsend_default_piigating and non-overwrite behavior. If code is reused from #997, includeCo-authored-by: Joris Bayer <joris.bayer@sentry.io>in commit trailers.