feat(attributes): Add sentry.event.serialized_* attributes - #556
Conversation
|
@cursor review |
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Breaking Changes 🛠
New Features ✨Attributes
Op
Other
Internal Changes 🔧Attribute
Attributes
Deps
Other
🤖 This preview updates automatically when you update the PR. |
b29ace9 to
519804b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b29ace9. Configure here.
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "never" | ||
| }, |
There was a problem hiding this comment.
PII scrubbing disabled for event data
High Severity
apply_scrubbing is set to never for sentry.event.serialized_breadcrumbs, sentry.event.serialized_contexts, and sentry.event.serialized_extra. These hold JSON-serialized breadcrumbs, contexts, and extra, which commonly contain PII. Per project policy and similar JSON content attributes like gen_ai.input.messages, this blocks scrubbing of sensitive data.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit b29ace9. Configure here.
There was a problem hiding this comment.
These keys are special, as PII is already applied by Relay to the original data before serialization.
I was thinking exposing them to scrubbing again might corrupt the JSON, but I suppose if they were already scrubbed once a second scrubbing pass should be safe? 🤔 @Dav1dde do you have an opinion on this?
There was a problem hiding this comment.
Copy pasta from Slack:
For now the scrubbing shouldn't matter as the segment span is extracted at the very end of the pipeline, right? If we ever change that, we must make sure this isn't broken (scrub context before serialize), so an integration test for that in Relay would be great (send tx with sensitive data, assert the serialized context is json and doesn't contain pii).
For the actual question, it shouldn't be pii = true, either maybe or false both work, since scrubbing this would actually break product features, I think it's fine to set it as never .


Add:
sentry.event.serialized_contextssentry.event.serialized_extrasentry.event.serialized_breadcrumbsas internal attributes for storing the JSON-serialized values from incoming Sentry transactions (and maybe later other event types).
These will be populated by Relay for incoming transaction events and displayed on the Sentry frontend so that transaction-based SDK users don't lose this data.
The
serialized_prefix allows us to e.g. use a different attribute name in the future once we natively support object types.