Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14031,6 +14031,63 @@ export const SENTRY_ENVIRONMENT = 'sentry.environment';
*/
export type SENTRY_ENVIRONMENT_TYPE = string;

// Path: model/attributes/sentry/sentry__event__serialized_breadcrumbs.json

/**
* JSON-serialized `breadcrumbs` property from a Sentry event. `sentry.event.serialized_breadcrumbs`
*
* Attribute Value Type: `string` {@link SENTRY_EVENT_SERIALIZED_BREADCRUMBS_TYPE}
*
* Apply Scrubbing: never
*
* Attribute defined in OTEL: No
* Visibility: internal
*/
export const SENTRY_EVENT_SERIALIZED_BREADCRUMBS = 'sentry.event.serialized_breadcrumbs';

/**
* Type for {@link SENTRY_EVENT_SERIALIZED_BREADCRUMBS} sentry.event.serialized_breadcrumbs
*/
export type SENTRY_EVENT_SERIALIZED_BREADCRUMBS_TYPE = string;

// Path: model/attributes/sentry/sentry__event__serialized_contexts.json

/**
* JSON-serialized `contexts` property from a Sentry event. `sentry.event.serialized_contexts`
*
* Attribute Value Type: `string` {@link SENTRY_EVENT_SERIALIZED_CONTEXTS_TYPE}
*
* Apply Scrubbing: never
*
* Attribute defined in OTEL: No
* Visibility: internal
*/
export const SENTRY_EVENT_SERIALIZED_CONTEXTS = 'sentry.event.serialized_contexts';

/**
* Type for {@link SENTRY_EVENT_SERIALIZED_CONTEXTS} sentry.event.serialized_contexts
*/
export type SENTRY_EVENT_SERIALIZED_CONTEXTS_TYPE = string;

// Path: model/attributes/sentry/sentry__event__serialized_extra.json

/**
* JSON-serialized `extra` property from a Sentry event. `sentry.event.serialized_extra`
*
* Attribute Value Type: `string` {@link SENTRY_EVENT_SERIALIZED_EXTRA_TYPE}
*
* Apply Scrubbing: never
*
* Attribute defined in OTEL: No
* Visibility: internal
*/
export const SENTRY_EVENT_SERIALIZED_EXTRA = 'sentry.event.serialized_extra';

/**
* Type for {@link SENTRY_EVENT_SERIALIZED_EXTRA} sentry.event.serialized_extra
*/
export type SENTRY_EVENT_SERIALIZED_EXTRA_TYPE = string;

// Path: model/attributes/sentry/sentry__exclusive_time.json

/**
Expand Down Expand Up @@ -18193,6 +18250,9 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'sentry.dsc.trace_id': 'string',
'sentry.dsc.transaction': 'string',
'sentry.environment': 'string',
'sentry.event.serialized_breadcrumbs': 'string',
'sentry.event.serialized_contexts': 'string',
'sentry.event.serialized_extra': 'string',
'sentry.exclusive_time': 'double',
'sentry.frames.frozen': 'integer',
'sentry.frames.slow': 'integer',
Expand Down Expand Up @@ -18983,6 +19043,9 @@ export type AttributeName =
| typeof SENTRY_DSC_TRACE_ID
| typeof SENTRY_DSC_TRANSACTION
| typeof SENTRY_ENVIRONMENT
| typeof SENTRY_EVENT_SERIALIZED_BREADCRUMBS
| typeof SENTRY_EVENT_SERIALIZED_CONTEXTS
| typeof SENTRY_EVENT_SERIALIZED_EXTRA
| typeof SENTRY_EXCLUSIVE_TIME
| typeof SENTRY_FRAMES_FROZEN
| typeof SENTRY_FRAMES_SLOW
Expand Down Expand Up @@ -28031,6 +28094,36 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
aliases: ['environment'],
changelog: [{ version: '0.0.0' }],
},
'sentry.event.serialized_breadcrumbs': {
brief: 'JSON-serialized `breadcrumbs` property from a Sentry event.',
type: 'string',
applyScrubbing: {
key: 'never',
},
isInOtel: false,
visibility: 'internal',
changelog: [{ version: 'next' }],
},
'sentry.event.serialized_contexts': {
brief: 'JSON-serialized `contexts` property from a Sentry event.',
type: 'string',
applyScrubbing: {
key: 'never',
},
isInOtel: false,
visibility: 'internal',
changelog: [{ version: 'next' }],
},
'sentry.event.serialized_extra': {
brief: 'JSON-serialized `extra` property from a Sentry event.',
type: 'string',
applyScrubbing: {
key: 'never',
},
isInOtel: false,
visibility: 'internal',
changelog: [{ version: 'next' }],
},
'sentry.exclusive_time': {
brief: 'The exclusive time duration of the span in milliseconds.',
type: 'double',
Expand Down Expand Up @@ -30725,6 +30818,9 @@ export type Attributes = {
[SENTRY_DSC_TRACE_ID]?: SENTRY_DSC_TRACE_ID_TYPE;
[SENTRY_DSC_TRANSACTION]?: SENTRY_DSC_TRANSACTION_TYPE;
[SENTRY_ENVIRONMENT]?: SENTRY_ENVIRONMENT_TYPE;
[SENTRY_EVENT_SERIALIZED_BREADCRUMBS]?: SENTRY_EVENT_SERIALIZED_BREADCRUMBS_TYPE;
[SENTRY_EVENT_SERIALIZED_CONTEXTS]?: SENTRY_EVENT_SERIALIZED_CONTEXTS_TYPE;
[SENTRY_EVENT_SERIALIZED_EXTRA]?: SENTRY_EVENT_SERIALIZED_EXTRA_TYPE;
[SENTRY_EXCLUSIVE_TIME]?: SENTRY_EXCLUSIVE_TIME_TYPE;
[SENTRY_FRAMES_FROZEN]?: SENTRY_FRAMES_FROZEN_TYPE;
[SENTRY_FRAMES_SLOW]?: SENTRY_FRAMES_SLOW_TYPE;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"key": "sentry.event.serialized_breadcrumbs",
"brief": "JSON-serialized `breadcrumbs` property from a Sentry event.",
"type": "string",
"apply_scrubbing": {
"key": "never"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b29ace9. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 .

"is_in_otel": false,
"visibility": "internal",
"changelog": [
{
"version": "next"
}
]
}
15 changes: 15 additions & 0 deletions model/attributes/sentry/sentry__event__serialized_contexts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"key": "sentry.event.serialized_contexts",
"brief": "JSON-serialized `contexts` property from a Sentry event.",
"type": "string",
"apply_scrubbing": {
"key": "never"
},
"is_in_otel": false,
"visibility": "internal",
"changelog": [
{
"version": "next"
}
]
}
15 changes: 15 additions & 0 deletions model/attributes/sentry/sentry__event__serialized_extra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"key": "sentry.event.serialized_extra",
"brief": "JSON-serialized `extra` property from a Sentry event.",
"type": "string",
"apply_scrubbing": {
"key": "never"
},
"is_in_otel": false,
"visibility": "internal",
"changelog": [
{
"version": "next"
}
]
}
69 changes: 69 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8200,6 +8200,42 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "production"
"""

# Path: model/attributes/sentry/sentry__event__serialized_breadcrumbs.json
SENTRY_EVENT_SERIALIZED_BREADCRUMBS: Literal[
"sentry.event.serialized_breadcrumbs"
] = "sentry.event.serialized_breadcrumbs"
"""JSON-serialized `breadcrumbs` property from a Sentry event.

Type: str
Apply Scrubbing: never
Defined in OTEL: No
Visibility: internal
"""

# Path: model/attributes/sentry/sentry__event__serialized_contexts.json
SENTRY_EVENT_SERIALIZED_CONTEXTS: Literal["sentry.event.serialized_contexts"] = (
"sentry.event.serialized_contexts"
)
"""JSON-serialized `contexts` property from a Sentry event.

Type: str
Apply Scrubbing: never
Defined in OTEL: No
Visibility: internal
"""

# Path: model/attributes/sentry/sentry__event__serialized_extra.json
SENTRY_EVENT_SERIALIZED_EXTRA: Literal["sentry.event.serialized_extra"] = (
"sentry.event.serialized_extra"
)
"""JSON-serialized `extra` property from a Sentry event.

Type: str
Apply Scrubbing: never
Defined in OTEL: No
Visibility: internal
"""

# Path: model/attributes/sentry/sentry__exclusive_time.json
SENTRY_EXCLUSIVE_TIME: Literal["sentry.exclusive_time"] = "sentry.exclusive_time"
"""The exclusive time duration of the span in milliseconds.
Expand Down Expand Up @@ -19693,6 +19729,36 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
ChangelogEntry(version="0.0.0"),
],
),
"sentry.event.serialized_breadcrumbs": AttributeMetadata(
brief="JSON-serialized `breadcrumbs` property from a Sentry event.",
type=AttributeType.STRING,
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.NEVER),
is_in_otel=False,
visibility=Visibility.INTERNAL,
changelog=[
ChangelogEntry(version="next"),
],
),
"sentry.event.serialized_contexts": AttributeMetadata(
brief="JSON-serialized `contexts` property from a Sentry event.",
type=AttributeType.STRING,
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.NEVER),
is_in_otel=False,
visibility=Visibility.INTERNAL,
changelog=[
ChangelogEntry(version="next"),
],
),
"sentry.event.serialized_extra": AttributeMetadata(
brief="JSON-serialized `extra` property from a Sentry event.",
type=AttributeType.STRING,
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.NEVER),
is_in_otel=False,
visibility=Visibility.INTERNAL,
changelog=[
ChangelogEntry(version="next"),
],
),
"sentry.exclusive_time": AttributeMetadata(
brief="The exclusive time duration of the span in milliseconds.",
type=AttributeType.DOUBLE,
Expand Down Expand Up @@ -22482,6 +22548,9 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"sentry.dsc.trace_id": str,
"sentry.dsc.transaction": str,
"sentry.environment": str,
"sentry.event.serialized_breadcrumbs": str,
"sentry.event.serialized_contexts": str,
"sentry.event.serialized_extra": str,
"sentry.exclusive_time": float,
"sentry.frames.frozen": int,
"sentry.frames.slow": int,
Expand Down
Loading