Skip to content

fix(nextjs): correctly drop tunnel-route spans for full URLs#19865

Closed
naaa760 wants to merge 1 commit intogetsentry:developfrom
naaa760:fix/autm-fil-tunn-rout-span
Closed

fix(nextjs): correctly drop tunnel-route spans for full URLs#19865
naaa760 wants to merge 1 commit intogetsentry:developfrom
naaa760:fix/autm-fil-tunn-rout-span

Conversation

@naaa760
Copy link
Contributor

@naaa760 naaa760 commented Mar 18, 2026

summary

  • Fix tunnel route span filtering for Next.js when http.target is an absolute URL.

Changes

  • Extract pathname from http.target when it includes scheme/host.
  • Prevent false positives from prefix-matching tunnel routes.
  • Add unit tests covering middleware and fetch span cases.

Tests

  • Added dropMiddlewareTunnelRequests() unit coverage in packages/nextjs/test/utils/dropMiddlewareTunnelRequests.test.ts.

fix : #19840

@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (remix) Server Timing Headers Trace Propagation by onurtemizkan in #18653

Bug Fixes 🐛

Deps

  • Bump devalue 5.6.3 to 5.6.4 to fix CVE-2026-30226 by chargome in #19849
  • Bump file-type to 21.3.2 and @nestjs/common to 11.1.17 by chargome in #19847
  • Bump unhead 2.1.4 to 2.1.12 to fix CVE-2026-31860 and CVE-2026-31873 by chargome in #19848
  • Bump flatted 3.3.1 to 3.4.2 to fix CVE-2026-32141 by chargome in #19842
  • Bump tar 7.5.10 to 7.5.11 to fix CVE-2026-31802 by chargome in #19846
  • Bump hono 4.12.5 to 4.12.7 in cloudflare-hono E2E test app by chargome in #19850
  • Bump undici 6.23.0 to 6.24.1 to fix multiple CVEs by chargome in #19841

Other

  • (deno) Clear pre-existing OTel global before registering TracerProvider by sergical in #19723
  • (nextjs) Correctly drop tunnel-route spans for full URLs by naaa760 in #19865
  • (node-core) Recycle propagationContext for each request by Lms24 in #19835

Internal Changes 🔧

  • (deps) Bump next from 16.1.5 to 16.1.7 in /dev-packages/e2e-tests/test-applications/nextjs-16 by dependabot in #19851
  • (react) Add gql tests for react router by chargome in #19844
  • (release) Switch from action-prepare-release to Craft by BYK in #18763

🤖 This preview updates automatically when you update the PR.

@chargome
Copy link
Member

We already fixed this in #19861

Please do not create PRs on tickets that already have an assignee. As mentioned before, please do reach out to us before starting to work on a fix/feature for alignment.

@chargome chargome closed this Mar 18, 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.

Next.js : automatically filter tunnel route spans

2 participants