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(node,bun,deno): Answer managed tunnel requests in the runtime by logaretm · Pull Request #25998 · getsentry/sentry-javascript

Conversation

@logaretm

@logaretm logaretm commented Nov 2, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This PR actually delivers the approach outlined in #25997 by hooking up the new utilities and wiring them up to the runtimes appropriately.

The implementation introduces a new integration factory that creates an integration for each runtime, it accepts a runtime-specific server patcher, and it applies the HTTP patch itself.

For Node.js / http module

For Node, and other runtimes that emit the http module's diagnostic channel, we patch the server emit and handle the request before it ever hits the user application.

For Deno / Bun

It does the same thing as in Node, but also adds a *.serve patch in-case the user is using the native runtime servers.

Note for reviewers: if you are lacking context on this PR, check #25997

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 #26002 November 2, 2026 19:44
@github-actions

github-actions Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 46cffcf (PR test merge using develop at 31201fb)

Against: 2f26678 (develop) · base run #65292

⚠️ Baseline mismatch: 17 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 31201fb finishes.

Path Size % Change Change
@sentry/browser 29.92 kB - -
@sentry/browser - with treeshaking flags 28.08 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.97 kB - -
@sentry/browser (incl. Tracing) 52.2 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.22 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.18 kB - -
@sentry/browser (incl. Tracing, Replay) 92.52 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.2 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.25 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.25 kB - -
@sentry/browser (incl. Feedback) 47.52 kB - -
@sentry/browser (incl. sendFeedback) 35.02 kB - -
@sentry/browser (incl. FeedbackAsync) 40.13 kB - -
@sentry/browser (incl. Metrics) 31.48 kB - -
@sentry/browser (incl. Logs) 31.77 kB - -
@sentry/browser (incl. Metrics & Logs) 32.45 kB - -
@sentry/react 31.78 kB - -
@sentry/react (incl. Tracing) 54.62 kB - -
@sentry/vue 38.24 kB - -
@sentry/vue (incl. Tracing) 55.24 kB - -
@sentry/svelte 29.95 kB - -
@sentry/remix (Remix 3 client bundle) 57.83 kB - -
CDN Bundle 31.72 kB - -
CDN Bundle (incl. Tracing) 52.81 kB - -
CDN Bundle (incl. Logs, Metrics) 34.52 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.32 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.9 kB - -
CDN Bundle (incl. Tracing, Replay) 90.98 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.54 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.11 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.71 kB - -
CDN Bundle - uncompressed 92.76 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.77 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.29 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.55 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.85 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.46 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 298.92 kB - -
@sentry/nextjs (client) 57.64 kB - -
@sentry/sveltekit (client) 52.73 kB - -
@sentry/core/server 44.17 kB +0.81% +354 B 🔺
@sentry/core/browser 13.93 kB - -
@sentry/node 157.07 kB +0.22% +342 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.28 kB - -
@sentry/node - without tracing 96.92 kB +0.34% +323 B 🔺
@sentry/node - without channel injection 137.36 kB +0.24% +317 B 🔺
@sentry/aws-serverless 105.56 kB +0.29% +298 B 🔺
@sentry/cloudflare (withSentry) - minified 200.99 kB +0.45% +895 B 🔺
@sentry/cloudflare (withSentry) 498.92 kB +0.37% +1.82 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 222.85 kB +0.41% +895 B 🔺

View base workflow run

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions

github-actions Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 6 not successful, 50 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Failing after 2m Details
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 10m Details
❌ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Failing after 28s Details
❌ CI: Optional E2E Tests / E2E node-eve Test (optional) Failing after 2m Details
❌ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Failing after 33s Details
❌ CI: Optional E2E Tests / E2E node-eve (latest) Test (optional) Failing after 59s Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 48s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (latest) Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 56s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 (tracer provider) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 28s Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 42s Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 30s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (tunnel-dev) Test (optional) Successful in 50s Details
✅ CI: Optional E2E Tests / E2E node-mastra (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 debug-id-sourcemaps Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 51s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
All reactions

Sorry, something went wrong.

Uh oh!

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

@logaretm logaretm mentioned this pull request Nov 2, 2026
feat(nextjs): Emit the tunnel route handler #25424
Merged
@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch 5 times, most recently from 86e706c to 0a00c73 Compare November 3, 2026 04:28
@logaretm
logaretm marked this pull request as ready for review November 3, 2026 04:53
@logaretm
logaretm requested review from a team as code owners November 3, 2026 04:53
@logaretm
logaretm requested review from Lms24, andreiborza, isaacs, msonnb, nicohrubec and s1gr1d and removed request for a team November 3, 2026 04:53
@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch from ff78a0d to a92ac02 Compare November 4, 2026 17:25
cursor[bot]
cursor Bot reviewed Nov 4, 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/server-utils/src/integrations/serveTunnel.ts Resolved

Uh oh!

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

@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch from a92ac02 to e35e392 Compare November 5, 2026 16:17
cursor[bot]
cursor Bot reviewed Nov 5, 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/bun/src/tunnelServer.ts Resolved

Uh oh!

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

Comment thread packages/bun/src/tunnelServer.ts Resolved

Uh oh!

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

@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch from e35e392 to f3239a8 Compare November 5, 2026 20:23
isaacs
isaacs approved these changes Nov 5, 2026
View reviewed changes
Comment thread packages/server-utils/src/integrations/serveTunnel.ts
Comment on lines +31 to +34
if (options.intercept !== false) {
instrumentTunnelServers();
instrumentRuntimeServers?.();
}

@isaacs isaacs Nov 5, 2026

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.

Bugbot raised this somewhat weirdly phrased imo, but there's a real issue here.

setupOnce runs once per integration name per process. If the first serveTunnelIntegration set up has intercept: false, then a later client or addIntegration with intercept: true won't install the hooks. Its tunnel requests then go to the app. The reverse case is harmless.

The gate doesn't buy much. Each hook reads intercept per request through getServedTunnelMatch, so with intercept: false installed hooks hand every request to the app anyway. TanStack already installs the hooks without any gate.

Suggestion: drop the if and always install in setupOnce. If the cost of a no-op emit wrapper with intercept: false matters, install from setup(client) when that client's intercept is not false. The install functions already keep their own "done once" flags.

Suggested change
if (options.intercept !== false) {
instrumentTunnelServers();
instrumentRuntimeServers?.();
}
instrumentTunnelServers();
instrumentRuntimeServers?.();

Sorry, something went wrong.

Uh oh!

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

All reactions

@logaretm logaretm Nov 6, 2026

Copy link
Copy Markdown
Member Author

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.

This would only be relevant if multiple clients exist, so that's why I ignored it.

Having multiple clients with two active tunnel configurations is not valid. I would have did it but Bun's hook adds a POST route for the tunnel path, which means we cannot have it both ways.

So this behaviors makes it uniform across runtimes, but leaving this edge case as a gap.

Happy to revisit if you think otherwise.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/bun/src/tunnelServer.ts Resolved

Uh oh!

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

Comment thread packages/server-utils/src/utils/tunnelServer.ts Resolved

Uh oh!

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

Comment thread packages/node/src/index.ts Resolved

Uh oh!

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

@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch from f3239a8 to 1ce6dab Compare November 5, 2026 21:58
cursor[bot]
cursor Bot reviewed Nov 5, 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/server-utils/src/utils/tunnelServer.ts Resolved

Uh oh!

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

@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch from 32a4161 to 2918f88 Compare November 6, 2026 02:01
cursor[bot]
cursor Bot reviewed Nov 6, 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 1 potential issue.

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 2918f88. Configure here.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/bun/src/tunnelServer.ts Resolved

Uh oh!

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

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

One or more gzipped bundles increased by more than 500 bytes. If this increase is intentional, add the Accept Bundlesize Increase label to this PR to rerun and accept the check.

All reactions

Sorry, something went wrong.

Uh oh!

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

logaretm added 11 commits November 6, 2026 15:03
@logaretm
feat(node,bun,deno): Answer managed tunnel requests in the runtime
d05449a
`serveTunnelIntegration` answers tunnel requests on every `node:http` server (through the
`http.server.request.start` diagnostics channel), `Bun.serve` and `Deno.serve` before the app sees them.
TanStack Start's `init` installs the hooks itself, since `tunnelRoute` enables the tunnel after `init`.

Every runtime gets the same set of malformed and hostile requests, to prove the app keeps working.
@logaretm
ref: Move the node:http tunnel hooks and integration into server-utils
4f3576a
@logaretm
ref(node): Export the server-utils tunnel hooks without a wrapper
da46f35
@logaretm
ref: Build the Bun and Deno tunnel integrations from a server-utils f…
2c1bdc5
…actory
@logaretm
ref: Export only the tunnel integration factory from server-utils
2e81fc4
@logaretm
fix(core): Answer tunnel requests in the HTTP server instrumentation'…
b6da44c
…s emit wrapper

With both wrappers on `emit`, the HTTP one wrapped again on the second request, so every request passed two HTTP
proxies, and anything replacing `emit` later dropped the tunnel. The HTTP wrapper now answers tunnel requests
itself, and the separate tunnel wrapper is only installed without it.
@logaretm
ref(bun): Read the tunnel routes from the served tunnel
5beb0b7
@logaretm
fix(bun): Add the tunnel to a copy of the Bun.serve options
d9783be
The tunnel wrapped `fetch` and replaced `routes` on the app's own options object, so passing the same object to
`server.reload` wrapped our wrappers again. Options a class gives through a `fetch` getter threw on the assignment
and got no tunnel.
@logaretm
ref(node): Define installTunnelHooks instead of renaming the server-u…
b1d9636
…tils function
@logaretm
test(node): Answer tunnel requests without the HTTP integration
91817a3
@logaretm
ref(core): Keep the Node tunnel handler out of bundles without a tunnel
c7c0c3f
Core's HTTP server instrumentation imported the tunnel's Node handler, so every Node and Cloudflare bundle carried
it. The tunnel now registers the handler in the tunnel store when its hooks install, and the instrumentation calls it
from there.
@logaretm
logaretm force-pushed the awad/runtime-tunnel-node-bun-deno branch from 033d6b4 to c7c0c3f Compare November 6, 2026 20:04
@logaretm logaretm mentioned this pull request Nov 6, 2026
Clean up the managed tunnel in v12 #26193
Open
2 tasks
@logaretm
logaretm merged commit 0da0b0c into develop Nov 6, 2026
795 of 835 checks passed

Uh oh!

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

@logaretm
logaretm deleted the awad/runtime-tunnel-node-bun-deno branch November 6, 2026 22:46
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Nov 10, 2026
publish: getsentry/[email protected] getsentry/publish#10343
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
@isaacs isaacs isaacs approved these changes
@nicohrubec nicohrubec Awaiting requested review from nicohrubec nicohrubec was automatically assigned from getsentry/team-javascript-sdks-framework
@s1gr1d s1gr1d Awaiting requested review from s1gr1d s1gr1d was automatically assigned from getsentry/team-javascript-sdks-framework
@andreiborza andreiborza Awaiting requested review from andreiborza andreiborza was automatically assigned from getsentry/team-javascript-sdks-server
@Lms24 Lms24 Awaiting requested review from Lms24 Lms24 was automatically assigned from getsentry/team-javascript-sdks-browser
@msonnb msonnb Awaiting requested review from msonnb msonnb was automatically assigned from getsentry/team-javascript-sdks-browser

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@logaretm @isaacs
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.