Skip to content

feat(browser): Add ingest_settings to v2 metrics envelope payload#20454

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

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

Conversation

@nicohrubec
Copy link
Copy Markdown
Member

@nicohrubec nicohrubec commented Apr 22, 2026

Adds version: 2 and ingest_settings to the metrics 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 #20276

@nicohrubec nicohrubec changed the title implement v2 envelopes for metrics feat(browser): Add ingest_settings to v2 metrics envelope payload Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 26.04 kB +0.64% +165 B 🔺
@sentry/browser - with treeshaking flags 24.52 kB +0.69% +166 B 🔺
@sentry/browser (incl. Tracing) 43.85 kB +0.1% +40 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 45.58 kB +0.18% +78 B 🔺
@sentry/browser (incl. Tracing, Profiling) 48.82 kB +0.18% +84 B 🔺
@sentry/browser (incl. Tracing, Replay) 83.06 kB +0.11% +84 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.57 kB +0.11% +74 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 87.75 kB +0.09% +72 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 100.04 kB +0.11% +108 B 🔺
@sentry/browser (incl. Feedback) 42.77 kB +0.17% +71 B 🔺
@sentry/browser (incl. sendFeedback) 30.71 kB +0.54% +162 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.63 kB +0.23% +81 B 🔺
@sentry/browser (incl. Metrics) 27.32 kB +0.58% +157 B 🔺
@sentry/browser (incl. Logs) 27.46 kB +0.63% +171 B 🔺
@sentry/browser (incl. Metrics & Logs) 28.14 kB +0.57% +157 B 🔺
@sentry/react 27.77 kB +0.52% +143 B 🔺
@sentry/react (incl. Tracing) 46.1 kB +0.12% +53 B 🔺
@sentry/vue 30.88 kB +0.55% +167 B 🔺
@sentry/vue (incl. Tracing) 45.68 kB +0.13% +59 B 🔺
@sentry/svelte 26.06 kB +0.66% +169 B 🔺
CDN Bundle 28.66 kB +0.3% +83 B 🔺
CDN Bundle (incl. Tracing) 46.13 kB +0.13% +56 B 🔺
CDN Bundle (incl. Logs, Metrics) 30.03 kB +0.24% +71 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 47.17 kB +0.13% +59 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 68.95 kB +0.05% +30 B 🔺
CDN Bundle (incl. Tracing, Replay) 83.17 kB +0.05% +37 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 84.21 kB +0.05% +40 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 88.68 kB +0.08% +70 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 89.75 kB +0.08% +63 B 🔺
CDN Bundle - uncompressed 83.74 kB +0.19% +154 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 137.78 kB +0.12% +161 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.89 kB +0.18% +154 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 141.19 kB +0.12% +161 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 211.44 kB +0.07% +132 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 255.19 kB +0.06% +132 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 258.59 kB +0.06% +132 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 268.11 kB +0.05% +132 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 271.49 kB +0.05% +132 B 🔺
@sentry/nextjs (client) 48.63 kB +0.11% +52 B 🔺
@sentry/sveltekit (client) 44.29 kB +0.16% +70 B 🔺
@sentry/node-core 58.52 kB +0.31% +176 B 🔺
@sentry/node 175.83 kB +0.11% +179 B 🔺
@sentry/node - without tracing 98.47 kB +0.19% +178 B 🔺
@sentry/aws-serverless 115.49 kB +0.15% +165 B 🔺

View base workflow run

@nicohrubec nicohrubec requested a review from chargome April 22, 2026 16:47
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 metrics envelope container to infer IP addresses

1 participant