feat(browser): Add `ingest_settings` to span v2 envelope payload by nicohrubec · Pull Request #20411 · getsentry/sentry-javascript · GitHub
Skip to content

feat(browser): Add ingest_settings to span v2 envelope payload#20411

Draft
nicohrubec wants to merge 6 commits intodevelopfrom
nh/span-streaming-ingest-settings
Draft

feat(browser): Add ingest_settings to span v2 envelope payload#20411
nicohrubec wants to merge 6 commits intodevelopfrom
nh/span-streaming-ingest-settings

Conversation

@nicohrubec
Copy link
Copy Markdown
Member

@nicohrubec nicohrubec commented Apr 21, 2026

Adds version: 2 and ingest_settings to the span streaming envelope payload so Relay can infer the end-user IP address and User-Agent from the incoming request (link to spec). This is only emitted by the browser SDK.

Both settings are currently gated behind sendDefaultPii (modeled after how event.sdk.settings.infer_ip works today, but maybe we should confirm this).

We'll wait on getsentry/relay#5869 to be implemented before sending this.

Closes #20275

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

@nicohrubec nicohrubec marked this pull request as ready for review April 21, 2026 07:11
@nicohrubec nicohrubec requested a review from chargome April 21, 2026 07:12
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a98a9ce. Configure here.

Comment thread packages/core/src/tracing/spans/envelope.ts Outdated
Comment thread packages/core/test/lib/tracing/spans/envelope.test.ts
...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),
};

const isBrowserSdk = options._metadata?.sdk?.name === 'sentry.javascript.browser';
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.

As discussed offline, we'll likely need better detection here for covering all browser based SDKs

@nicohrubec
Copy link
Copy Markdown
Member Author

@chargome updated the detection to use isBrowser from core. what do you think about the PII gating?

@nicohrubec nicohrubec requested a review from chargome April 21, 2026 09:16
@chargome chargome marked this pull request as draft April 21, 2026 12:51
@chargome
Copy link
Copy Markdown
Member

@nicohrubec nicohrubec assigned nicohrubec and unassigned nicohrubec Apr 22, 2026
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.

Add ingest_settings property on span envelope container to infer IP addresses

2 participants