Skip to content

feat(core): Gate URL fragments behind urlQueryParams - #26753

Merged
chargome merged 2 commits into
developfrom
feat/data-collection-url-fragment
Nov 23, 2026
Merged

chargome merged 2 commits into
developfrom
feat/data-collection-url-fragment

Conversation

@chargome

Copy link
Copy Markdown
Member

What

The urlQueryParams option now also applies to URL fragments. key=value pairs in a fragment are filtered like query params, and the fragment is dropped when urlQueryParams is off. This covers url.full, url.fragment, request.url and breadcrumbs. Anchors and hash route paths (#details, #/settings) are kept as-is.

Why

Fragments can carry the same secrets as query strings. OAuth and OIDC login redirects return tokens in the fragment (#access_token=...), and hash-based routing puts its query string there (#/callback?token=...). This follows data collection spec 0.19.0 (getsentry/sentry-docs#20904). The no-unfiltered-url-attributes lint rule now also checks url.fragment, so new call sites can't skip the filter.

Fragments can carry the same secrets as query strings: OAuth and OIDC
login redirects return tokens in the fragment (#access_token=...), and
hash-based routing puts its query string there (#/callback?token=...).

Following data collection spec 0.19.0, collected URLs and url.fragment
now filter key=value pairs in the fragment like query params, and drop
the fragment when urlQueryParams is off. Anchors and hash route paths
are kept as-is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome chargome self-assigned this Nov 23, 2026
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: e59c7a1 (PR test merge using develop at 127485c)

Against: 127485c (develop) · base run #67503

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.34 kB +0.27% +80 B 🔺
@sentry/browser - with treeshaking flags 28.53 kB +0.27% +74 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.41 kB +0.28% +79 B 🔺
@sentry/browser (incl. Tracing) 52.98 kB +0.15% +79 B 🔺
@sentry/browser (incl. Tracing Core) 40.39 kB +0.18% +72 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.98 kB +0.16% +82 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.84 kB +0.13% +67 B 🔺
@sentry/browser (incl. Tracing, Replay) 93.02 kB +0.08% +67 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.87 kB +0.11% +82 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.37 kB +0.07% +67 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.96 kB +0.08% +80 B 🔺
@sentry/browser (incl. Feedback) 48.31 kB +0.22% +105 B 🔺
@sentry/browser (incl. sendFeedback) 30.91 kB +0.26% +78 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.96 kB +0.27% +94 B 🔺
@sentry/browser (incl. Metrics) 31.66 kB +0.26% +81 B 🔺
@sentry/browser (incl. Logs) 31.94 kB +0.27% +84 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.6 kB +0.24% +77 B 🔺
@sentry/react 32.36 kB +0.29% +92 B 🔺
@sentry/react (incl. Tracing) 55.57 kB +0.15% +79 B 🔺
@sentry/vue 38.53 kB +0.22% +83 B 🔺
@sentry/vue (incl. Tracing) 55.92 kB +0.18% +98 B 🔺
@sentry/svelte 30.36 kB +0.31% +92 B 🔺
@sentry/effect (client) 301.12 kB +0.03% +76 B 🔺
@sentry/effect (client, incl. Tracing) 308.28 kB +0.03% +64 B 🔺
@sentry/effect (client, incl. Tracing, Logs, Metrics) 311.14 kB +0.03% +68 B 🔺
@sentry/remix (Remix 3 client bundle) 58.61 kB +0.16% +91 B 🔺
CDN Bundle 32.26 kB +0.22% +69 B 🔺
CDN Bundle (incl. Tracing) 53.38 kB +0.18% +95 B 🔺
CDN Bundle (incl. Logs, Metrics) 35.04 kB +0.22% +75 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.92 kB +0.15% +82 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 76.12 kB +0.1% +69 B 🔺
CDN Bundle (incl. Tracing, Replay) 91.26 kB +0.07% +63 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.89 kB +0.07% +62 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.69 kB +0.07% +64 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.24 kB +0.08% +74 B 🔺
CDN Bundle - uncompressed 94.22 kB +0.26% +238 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.81 kB +0.19% +298 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.56 kB +0.24% +238 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 165.44 kB +0.19% +298 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.79 kB +0.11% +238 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 278.09 kB +0.11% +298 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.72 kB +0.11% +298 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 290.02 kB +0.11% +298 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.64 kB +0.11% +298 B 🔺
@sentry/nextjs (client) 59.34 kB +0.14% +81 B 🔺
@sentry/sveltekit (client) 54.26 kB +0.2% +106 B 🔺
@sentry/core/server 45.81 kB +0.15% +66 B 🔺
@sentry/core/browser 14.41 kB - -
@sentry/node 155.96 kB +0.07% +94 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.46 kB - -
@sentry/node - without tracing 89.03 kB +0.12% +98 B 🔺
@sentry/node - without channel injection 144.89 kB +0.07% +88 B 🔺
@sentry/aws-serverless 99.7 kB +0.14% +132 B 🔺
@sentry/cloudflare (withSentry) - minified 209.44 kB +0.19% +391 B 🔺
@sentry/cloudflare (withSentry) 486.24 kB +0.24% +1.16 kB 🔺
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 1.04 MB +0.1% +945 B 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 234.67 kB +0.17% +391 B 🔺

View base workflow run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 63 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Failing after 1m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E express-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 48s Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E express-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 50s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (bun) Test (optional) Successful in 58s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (cloudflare) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (deno) Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E express-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve (content off) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 26s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E node-eve (0.x) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 (MCP SDK OpenTelemetry) Test (optional) Successful in 30s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 26s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 42s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 30s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 31s Details

Cover the fetch span wiring end to end: sensitive fragment pairs are
filtered by default, and the fragment is dropped when urlQueryParams is
off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b254d2f. Configure here.

@chargome
chargome marked this pull request as ready for review November 23, 2026 11:32
@chargome
chargome requested review from s1gr1d and timfish November 23, 2026 11:32
@chargome
chargome merged commit 6f20674 into develop Nov 23, 2026
464 of 465 checks passed
@chargome
chargome deleted the feat/data-collection-url-fragment branch November 23, 2026 12:20
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