Skip to content

feat(tanstackstart-react): Serve the managed tunnel from the server entry - #25408

Draft
logaretm wants to merge 4 commits into
awad/tunnel-browser-managedfrom
awad/tunnel-tanstackstart
Draft

logaretm wants to merge 4 commits into
awad/tunnel-browser-managedfrom
awad/tunnel-tanstackstart

Conversation

@logaretm

@logaretm logaretm commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

TanStack Start picked a random tunnel path per build and patched the generated route tree to serve it.

Because the new approach relies less on build-time, the logic was changed to wrap the server entrypoint instead and only route the matching tunnel requests to our handler.

This isn't a breaking change, previously we injected a single endpoint handler, now we inject a middleware since the DSN is only known at runtime.

closes #25461

@logaretm
logaretm added this pull request to stack #25201 October 15, 2026 15:13
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 31.03 kB +3.87% +1.16 kB 🔺
@sentry/browser - with treeshaking flags 28.82 kB +2.87% +803 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.72 kB +2.86% +798 B 🔺
@sentry/browser (incl. Tracing) 53.24 kB +2.26% +1.17 kB 🔺
@sentry/browser (incl. Tracing + Span Streaming) 53.24 kB +2.24% +1.17 kB 🔺
@sentry/browser (incl. Tracing, Profiling) 56.24 kB +2.24% +1.23 kB 🔺
@sentry/browser (incl. Tracing, Replay) 92.99 kB +1.28% +1.17 kB 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.48 kB +1% +799 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.74 kB +1.24% +1.19 kB 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.67 kB +1.09% +1.19 kB 🔺
@sentry/browser (incl. Feedback) 48.6 kB +2.55% +1.21 kB 🔺
@sentry/browser (incl. sendFeedback) 36.12 kB +3.37% +1.18 kB 🔺
@sentry/browser (incl. FeedbackAsync) 41.25 kB +3% +1.2 kB 🔺
@sentry/browser (incl. Metrics) 32.03 kB +3.65% +1.13 kB 🔺
@sentry/browser (incl. Logs) 32.32 kB +3.65% +1.14 kB 🔺
@sentry/browser (incl. Metrics & Logs) 33.01 kB +3.78% +1.2 kB 🔺
@sentry/react 32.84 kB +3.58% +1.13 kB 🔺
@sentry/react (incl. Tracing) 55.52 kB +2.08% +1.13 kB 🔺
@sentry/vue 39.21 kB +3.09% +1.17 kB 🔺
@sentry/vue (incl. Tracing) 56.25 kB +2.26% +1.24 kB 🔺
@sentry/svelte 31.06 kB +3.88% +1.16 kB 🔺
@sentry/remix (Remix 3 client bundle) 58.28 kB +2.11% +1.2 kB 🔺
CDN Bundle 32.36 kB +2.27% +716 B 🔺
CDN Bundle (incl. Tracing) 53.3 kB +1.38% +723 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.55 kB +2.13% +718 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.25 kB +1.34% +728 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.52 kB +1.01% +751 B 🔺
CDN Bundle (incl. Tracing, Replay) 90.97 kB +0.8% +717 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.96 kB +0.86% +785 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 97.14 kB +0.77% +737 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.14 kB +0.81% +792 B 🔺
CDN Bundle - uncompressed 95.04 kB +2% +1.86 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.88 kB +1.19% +1.85 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.58 kB +1.87% +1.86 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.84 kB +1.15% +1.85 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.62 kB +0.82% +1.86 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 278.05 kB +0.67% +1.85 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.99 kB +0.66% +1.85 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.75 kB +0.64% +1.85 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.69 kB +0.63% +1.85 kB 🔺
@sentry/nextjs (client) 57.92 kB +1.98% +1.12 kB 🔺
@sentry/sveltekit (client) 53.58 kB +2.17% +1.14 kB 🔺
@sentry/core/server 41.85 kB +1.78% +730 B 🔺
@sentry/core/browser 13.81 kB - -
@sentry/node 153.84 kB +0.5% +757 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 84.04 kB - -
@sentry/node - without tracing 95.58 kB +0.75% +709 B 🔺
@sentry/node - without channel injection 131.89 kB +0.58% +748 B 🔺
@sentry/aws-serverless 103.84 kB +0.79% +805 B 🔺
@sentry/cloudflare (withSentry) - minified 212.53 kB +0.92% +1.93 kB 🔺
@sentry/cloudflare (withSentry) 526.33 kB +0.73% +3.8 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 230.21 kB +0.85% +1.93 kB 🔺

View base workflow run

@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch from 2202cda to 46e486c Compare October 15, 2026 15:36
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch 3 times, most recently from 9069686 to b589186 Compare October 15, 2026 17:15
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch 3 times, most recently from a5fcc1b to f2a6beb Compare October 15, 2026 18:16
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch 2 times, most recently from 722f4c6 to eec9ddf Compare October 15, 2026 18:28
@logaretm

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.

Stale Bugbot comment from a previous run.

@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch from eec9ddf to 8d3dee9 Compare October 16, 2026 01:51
@logaretm

Copy link
Copy Markdown
Member Author

bugbot run

1 similar comment
@logaretm

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 8d3dee9. Configure here.

@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch from 8d3dee9 to 8c6c1fa Compare October 16, 2026 02:25
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch 2 times, most recently from 6b24a7b to 64c909f Compare October 16, 2026 14:00
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch 2 times, most recently from 7bd1c8e to 8a40b3b Compare October 16, 2026 16:15
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch from 8a40b3b to 2959a87 Compare October 16, 2026 17:56
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch from 2959a87 to 7a741d7 Compare October 16, 2026 20:56
…ntry

The Vite plugin now wraps the app's server entry, so `Sentry.init({ tunnel: true })`
works with no build option and tunnel requests are answered before Start's
request middleware and routing. Every `tunnelRoute` form is served the same way:
`true` uses the DSN-derived path instead of a random one per build, and a static
path no longer patches the generated route tree.
@logaretm
logaretm force-pushed the awad/tunnel-tanstackstart branch from 7a741d7 to d4c1808 Compare October 16, 2026 21:02

This branch has not been deployed

No deployments
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.

TanStack Start managed tunnel

1 participant