fix(v10/browser): Set user_agent.original on all spans for consistent filtering - #24226
Merged
Conversation
…nt filtering Backport of: #24216
Lms24
marked this pull request as ready for review
September 9, 2026 09:23
Lms24
requested review from
logaretm and
msonnb
and removed request for
a team
September 9, 2026 09:23
nicohrubec
approved these changes
Sep 9, 2026
JPeer264
approved these changes
Sep 9, 2026
Lms24
enabled auto-merge (squash)
September 9, 2026 09:26
Contributor
size-limit report 📦
|
50 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/browserimport path and its unfilteredreqData.headers/reqData.url. v10 has nodataCollectionheader filtering (_INTERNAL_filterKeyValueData,filterCollectedUrl), soprocessSpantakes noclientargument here.packages/browser/test/integrations/httpcontext.test.ts: dropped thedataCollectionsuite updates (that suite doesn't exist on v10) and added theUSER_AGENTconst the ported assertions reference.nextjs-app-dir/nextjs-pages-dirtransactions.test.ts: on v10 these still assert on transaction-eventcontexts.trace.data, which carries no user-agent attribute, so there is nothing to rename.browserTracingIntegration/interactions-streamed/on v10 rather thantracing/interactions/spans/; same content, different path.The behavioral fix itself is ported in full.