Skip to content

fix(spans): Remove unknown fields in processing mode - #6800

Open
jjbayer wants to merge 2 commits into
masterfrom
fix/no-other
Open

jjbayer wants to merge 2 commits into
masterfrom
fix/no-other

Conversation

@jjbayer

@jjbayer jjbayer commented Dec 2, 2026

Copy link
Copy Markdown
Member

Run the RemoveOther processor for spans, so their additional_properties get removed.

Fixes https://linear.app/getsentry/issue/RELAY-307/

@linear-code

linear-code Bot commented Dec 2, 2026

Copy link
Copy Markdown

RELAY-307


/// Additional arbitrary fields for forwards compatibility.
#[metastructure(additional_properties, pii = "maybe")]
#[metastructure(additional_properties, retain = false, pii = "maybe")]

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.

This doesn't change anything (retain = false is the default). I added it for clarity.

};

// Remove unknown / untrusted fields.
if ctx.is_processing() {

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.

Error / transaction processing have a whole dance around FullyNormalized. The is_processing check is good enough IMO though, because we do not respect the fully_normalized flag for spans anywhere else.

"is_segment": True,
"name": "some op",
"status": "ok",
"retention_days": 666, # Ensure that clients cannot overwrite trusted relay fields

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.

The correct retention (42) is asserted further below.

@jjbayer
jjbayer marked this pull request as ready for review December 2, 2026 11:37
@jjbayer
jjbayer requested a review from a team as a code owner December 2, 2026 11:37
@jjbayer
jjbayer enabled auto-merge December 2, 2026 12:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants