GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Accept `tunnel: true` in `init` to enable the managed tunnel by logaretm · Pull Request #25200 · getsentry/sentry-javascript

Conversation

@logaretm

@logaretm logaretm commented Oct 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Previously the client side only accepted a string tunnel option so it sent the requests to that fixed endpoint, this PR effectively adds "managed" tunnel support that is generated automatically from the provided DSN.

This PR adds the tunnel options to the SDKs's init options and implements the client transport if the tunnel is provided.

On the server side the runtime SDKs only translate tunnel: true into the internal _managedTunnel option, answering the requests is left to the meta-frameworks in the rest of the stack.

For reviewers: if you need an overview of what this is, refer to #25199.

closes #25460

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@logaretm
logaretm added this pull request to stack #25201 October 8, 2026 15:45
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch from ec2da8d to 2933944 Compare October 8, 2026 16:05
@logaretm logaretm changed the title feat(browser): Add applyManagedTunnel to point the tunnel at the DSN-derived path feat: Accept tunnel: true in init to enable the managed tunnel Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 3a5171f (PR test merge using develop at 8c4491d)

Against: ca4fc32 (develop) · base run #62950

⚠️ Baseline mismatch: 34 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for 8c4491d finishes.

Path Size % Change Change
@sentry/browser 30.56 kB +2.18% +651 B 🔺
@sentry/browser - with treeshaking flags 28.54 kB +1.76% +491 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.42 kB +1.69% +470 B 🔺
@sentry/browser (incl. Tracing) 52.8 kB +1.35% +702 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.8 kB +1.35% +699 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.77 kB +1.31% +720 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.47 kB +0.68% +621 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.21 kB +0.61% +492 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB +0.66% +633 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.2 kB +0.63% +687 B 🔺
@sentry/browser (incl. Feedback) 48.12 kB +1.49% +703 B 🔺
@sentry/browser (incl. sendFeedback) 35.63 kB +1.9% +664 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.76 kB +1.71% +684 B 🔺
@sentry/browser (incl. Metrics) 31.57 kB +2.05% +634 B 🔺
@sentry/browser (incl. Logs) 31.84 kB +2.02% +629 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.52 kB +2.12% +673 B 🔺
@sentry/react 32.37 kB +1.99% +630 B 🔺
@sentry/react (incl. Tracing) 55.05 kB +1.17% +635 B 🔺
@sentry/vue 38.71 kB +1.7% +646 B 🔺
@sentry/vue (incl. Tracing) 55.75 kB +1.3% +715 B 🔺
@sentry/svelte 30.59 kB +2.2% +656 B 🔺
@sentry/remix (Remix 3 client bundle) 57.84 kB +1.27% +722 B 🔺
CDN Bundle 32.14 kB +1.5% +474 B 🔺
CDN Bundle (incl. Tracing) 53.09 kB +0.92% +480 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.34 kB +1.4% +471 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.04 kB +0.89% +484 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.29 kB +0.67% +499 B 🔺
CDN Bundle (incl. Tracing, Replay) 90.75 kB +0.53% +476 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.69 kB +0.52% +479 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.89 kB +0.49% +470 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.86 kB +0.5% +486 B 🔺
CDN Bundle - uncompressed 94.44 kB +1.24% +1.15 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.29 kB +0.74% +1.15 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.99 kB +1.16% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.26 kB +0.72% +1.15 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.03 kB +0.51% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.46 kB +0.42% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.42 kB +0.41% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.16 kB +0.4% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.11 kB +0.39% +1.15 kB 🔺
@sentry/nextjs (client) 57.91 kB +1.05% +601 B 🔺
@sentry/sveltekit (client) 53.11 kB +1.21% +634 B 🔺
@sentry/core/server 43.52 kB +4.13% +1.73 kB 🔺
@sentry/core/browser 13.81 kB - -
@sentry/node 153.28 kB +0.44% +659 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.58 kB - -
@sentry/node - without tracing 94.9 kB +0.69% +649 B 🔺
@sentry/node - without channel injection 133.92 kB +0.47% +616 B 🔺
@sentry/aws-serverless 103.15 kB +0.7% +710 B 🔺
@sentry/cloudflare (withSentry) - minified 213.13 kB +0.96% +2.02 kB 🔺
@sentry/cloudflare (withSentry) 528.73 kB +0.94% +4.9 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 232.75 kB +0.88% +2.01 kB 🔺

View base workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch from 2933944 to 4837dc0 Compare October 15, 2026 14:38
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch 2 times, most recently from d5c110f to 4ab6297 Compare October 15, 2026 14:44
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch from 4ab6297 to bf1d62c Compare October 15, 2026 14:47
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch 3 times, most recently from 75a299e to b1553a8 Compare October 15, 2026 15:36
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch from b1553a8 to 0e573ca Compare October 15, 2026 15:51
@logaretm logaretm changed the title feat: Accept tunnel: true in init to enable the managed tunnel feat: Accept tunnel: true in the SDKs that serve the managed tunnel Oct 15, 2026
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch from 1d77f74 to 80f1700 Compare October 15, 2026 17:15
@logaretm logaretm changed the title feat: Accept tunnel: true in the SDKs that serve the managed tunnel feat: Accept tunnel: true in init to enable the managed tunnel Oct 15, 2026
@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch 4 times, most recently from a769b10 to d79df66 Compare October 15, 2026 18:28
@logaretm

logaretm commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

bugbot run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 15, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/client.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/browser/src/utils/managedTunnel.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@logaretm
logaretm force-pushed the awad/tunnel-browser-managed branch from d79df66 to 8717465 Compare October 16, 2026 01:51
@logaretm

logaretm commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

bugbot run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@logaretm

logaretm commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

bugbot run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

logaretm added 21 commits October 27, 2026 10:30
@logaretm
fix(core): Point Next.js users to tunnelRoute when the managed tunn…
8f6d026
…el isn't served
@logaretm
feat(browser): Send directly to Sentry when nothing answers the manag…
8c16e68
…ed tunnel
@logaretm
fix(browser): Normalize the managed tunnel's base path like the serve…
0259e8a
…r does
@logaretm
fix(browser): Keep the managed tunnel when Sentry answers 404 or 405 …
f2f47f7
…through it
@logaretm
fix(browser): Send directly when anything but the tunnel answers a ma…
3b0d84f
…naged tunnel request with a 4xx
@logaretm
ref(browser): Warn about a rejected DSN from the managed tunnel trans…
90e2009
…port, and import server helpers from core/server

Only the browser sends to a managed tunnel, so the warning moves from the shared Client into the browser's tunnel transport. Server SDKs import resolveServerTunnelOption from @sentry/core/server.
@logaretm
ref(browser): Switch the managed tunnel to direct sends in one place
3262f00
The reason strings were built in production bundles too, while only the debug warning that printed them was stripped.
@logaretm
test(browser): Drop the server-side tunnel match from the browser tun…
f3f20a3
…nel tests

`isTunnelRequest` only reads the active server client now, and the paths are already checked against `getTunnelPath`.
@logaretm
ref(browser): Trim the managed tunnel comments
a0edcba
@logaretm
fix(aws-serverless): Keep the Lambda extension for a relative tunnel …
6e0076c
…path, which is the managed tunnel to serve
@logaretm
ref: Import the internal tunnel helpers under their _INTERNAL_ names
e30055a
@logaretm
ref: Narrow tunnel to the browser or server tunnel options per SDK
8836f15
@logaretm
feat(browser): Treat a relative tunnel path as a managed one and only…
583ac7e
… fall back on 404 or 405
@logaretm
ref(browser): Fold the managed tunnel fallback into the fetch transport
3262ead
@logaretm
fix(browser): Resend to Sentry after the tunnel request leaves the ke…
be8aae9
…epalive totals
@logaretm
test(vercel-edge): Check that init resolves the managed tunnel option
2cf4d9f
@logaretm
fix(core): Use a tunnel path the user wrote as written, without the f…
351f3f1
…ramework base path

The base path only applies to the DSN-derived path, so a relative `tunnel` string keeps posting where it did before the managed tunnel.
@logaretm
ref(browser): Drop the direct send fallback for the managed tunnel
0e16bcc
The fetch transport is back to how it was, and the tunnel sets its envelope content type through the transport headers.
@logaretm
ref(core): Drop the X-Sentry-Tunnel response header
8b0a9e3
Only the direct send fallback read it.
@logaretm
ref(browser): Leave a string tunnel as written
5bddfc0
A relative string posts exactly as before the managed tunnel, with the default content type, so tunnels the app serves itself keep working.
@logaretm
docs(core): Describe a relative tunnel string as used as written
f4750d5
Lms24
Lms24 approved these changes Oct 27, 2026
View reviewed changes

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for making the adjustments around dropping the fallback behavior! I think this is easier to to reason about for now and carries less risk of breaking anyone on a custom tunnel setup. We can revisit this later on.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
logaretm added 2 commits October 27, 2026 11:19
@logaretm
feat: Serve the managed tunnel with serveTunnelIntegration instead …
4215ada
…of the server `tunnel` option

On a server, `tunnel` keeps its one meaning, the URL to send its own envelopes to. The forwarding code lives behind the integration, so apps without a tunnel do not bundle it.
@logaretm
fix(remix): Pass the Remix options to the Node init as Node options
2ddc3f9
cursor[bot]
cursor Bot reviewed Oct 27, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2ddc3f9. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/node/test/sdk/init.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@logaretm
fix(core): Find the tunnel forwarder through the client, for framewor…
7cd8dcb
…k SDKs that bundle their own copy of core
This was referenced Oct 27, 2026
feat(astro): Serve the managed tunnel from the Sentry middleware #25419
Merged
feat(react-router): Serve the managed tunnel from a route in the server build #25422
Merged
@logaretm
test(core): Await the forward in the bundled core copy test
2f697bd
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Oct 28, 2026
publish: getsentry/[email protected] getsentry/publish#10069
Closed
51 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@timfish timfish timfish approved these changes
@Lms24 Lms24 Lms24 approved these changes
@JPeer264 JPeer264 JPeer264 approved these changes
@isaacs isaacs Awaiting requested review from isaacs isaacs was automatically assigned from getsentry/team-javascript-sdks-server
@mydea mydea Awaiting requested review from mydea mydea was automatically assigned from getsentry/team-javascript-sdks-browser
@s1gr1d s1gr1d Awaiting requested review from s1gr1d s1gr1d was automatically assigned from getsentry/team-javascript-sdks-framework
@andreiborza andreiborza Awaiting requested review from andreiborza

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Accept Bundlesize Increase

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Managed tunnel in core and browser

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@logaretm @mydea @JPeer264 @timfish @Lms24
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.