Skip to content

fix(v10/browser): Set user_agent.original on all spans for consistent filtering - #24226

Merged
Lms24 merged 1 commit into
v10from
lms/backport-v10-user-agent-original
Sep 9, 2026
Merged

fix(v10/browser): Set user_agent.original on all spans for consistent filtering#24226
Lms24 merged 1 commit into
v10from
lms/backport-v10-user-agent-original

Conversation

@Lms24

@Lms24 Lms24 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Backport of: #24216

Technically, this removes an attribute and sets another. However, this only affects span streaming, which is opt-in and not 100% stable on v10, so I think it's fine.

Differences to the original PR

  • packages/browser/src/integrations/httpcontext.ts: kept v10's @sentry/core/browser import path and its unfiltered reqData.headers / reqData.url. v10 has no dataCollection header filtering (_INTERNAL_filterKeyValueData, filterCollectedUrl), so processSpan takes no client argument here.
  • packages/browser/test/integrations/httpcontext.test.ts: dropped the dataCollection suite updates (that suite doesn't exist on v10) and added the USER_AGENT const the ported assertions reference.
  • Skipped nextjs-app-dir / nextjs-pages-dir transactions.test.ts: on v10 these still assert on transaction-event contexts.trace.data, which carries no user-agent attribute, so there is nothing to rename.
  • The interaction test lives at browserTracingIntegration/interactions-streamed/ on v10 rather than tracing/interactions/spans/; same content, different path.

The behavioral fix itself is ported in full.

@Lms24
Lms24 marked this pull request as ready for review September 9, 2026 09:23
@Lms24
Lms24 requested a review from a team as a code owner September 9, 2026 09:23
@Lms24
Lms24 requested review from logaretm and msonnb and removed request for a team September 9, 2026 09:23
@Lms24 Lms24 self-assigned this Sep 9, 2026
@Lms24
Lms24 enabled auto-merge (squash) September 9, 2026 09:26
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.77 kB added added
@sentry/browser - with treeshaking flags 26.21 kB added added
@sentry/browser (incl. Tracing) 46.62 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.42 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.38 kB added added
@sentry/browser (incl. Tracing, Replay) 85.89 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.51 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.61 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.24 kB added added
@sentry/browser (incl. Feedback) 44.94 kB added added
@sentry/browser (incl. sendFeedback) 32.56 kB added added
@sentry/browser (incl. FeedbackAsync) 37.71 kB added added
@sentry/browser (incl. Metrics) 28.86 kB added added
@sentry/browser (incl. Logs) 29.09 kB added added
@sentry/browser (incl. Metrics & Logs) 29.79 kB added added
@sentry/react 29.58 kB added added
@sentry/react (incl. Tracing) 48.89 kB added added
@sentry/vue 33.2 kB added added
@sentry/vue (incl. Tracing) 48.61 kB added added
@sentry/svelte 27.8 kB added added
CDN Bundle 30.17 kB added added
CDN Bundle (incl. Tracing) 48.59 kB added added
CDN Bundle (incl. Logs, Metrics) 31.75 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.92 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71.03 kB added added
CDN Bundle (incl. Tracing, Replay) 86.13 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.43 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.9 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.2 kB added added
CDN Bundle - uncompressed 89.9 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.7 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.61 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.68 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.44 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.01 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.97 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.71 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.67 kB added added
@sentry/nextjs (client) 51.47 kB added added
@sentry/sveltekit (client) 47.06 kB added added
@sentry/core/server 80.8 kB added added
@sentry/core/browser 66.95 kB added added
@sentry/node-core 63.33 kB added added
@sentry/node 126.02 kB added added
@sentry/node (incl. diagnostics channel injection) 170.11 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B added added
@sentry/node/light 51.47 kB added added
@sentry/node - without tracing 75 kB added added
@sentry/aws-serverless 84.26 kB added added
@sentry/cloudflare (withSentry) - minified 202.76 kB added added
@sentry/cloudflare (withSentry) 499.38 kB added added

@Lms24
Lms24 merged commit 9f38e48 into v10 Sep 9, 2026
213 checks passed
@Lms24
Lms24 deleted the lms/backport-v10-user-agent-original branch September 9, 2026 09:35
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.

3 participants