Skip to content

feat(react-router): Serve the managed tunnel from a route in the server build - #25422

Open
logaretm wants to merge 9 commits into
awad/tunnel-remixfrom
awad/tunnel-react-router
Open

logaretm wants to merge 9 commits into
awad/tunnel-remixfrom
awad/tunnel-react-router

Conversation

@logaretm

@logaretm logaretm commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

React Router has no request hook, so to wire the tunnel logic, we add a resource route to the server build whose path comes from the DSN at runtime.

closes #20255

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

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.53 kB +2.18% +649 B 🔺
@sentry/browser - with treeshaking flags 28.51 kB +1.75% +490 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.39 kB +1.7% +473 B 🔺
@sentry/browser (incl. Tracing) 52.77 kB +1.35% +699 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.77 kB +1.35% +698 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.74 kB +1.32% +721 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.44 kB +0.68% +616 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.18 kB +0.62% +496 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.18 kB +0.66% +629 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.17 kB +0.63% +683 B 🔺
@sentry/browser (incl. Feedback) 48.09 kB +1.48% +699 B 🔺
@sentry/browser (incl. sendFeedback) 35.6 kB +1.9% +662 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.73 kB +1.71% +683 B 🔺
@sentry/browser (incl. Metrics) 31.54 kB +2.05% +633 B 🔺
@sentry/browser (incl. Logs) 31.81 kB +2.01% +626 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.48 kB +2.11% +670 B 🔺
@sentry/react 32.33 kB +2% +631 B 🔺
@sentry/react (incl. Tracing) 55.02 kB +1.17% +633 B 🔺
@sentry/vue 38.68 kB +1.7% +643 B 🔺
@sentry/vue (incl. Tracing) 55.72 kB +1.31% +716 B 🔺
@sentry/svelte 30.56 kB +2.2% +657 B 🔺
@sentry/remix (Remix 3 client bundle) 57.8 kB +1.26% +715 B 🔺
CDN Bundle 32.11 kB +1.49% +470 B 🔺
CDN Bundle (incl. Tracing) 53.06 kB +0.91% +478 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.31 kB +1.41% +474 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.01 kB +0.89% +483 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.26 kB +0.66% +492 B 🔺
CDN Bundle (incl. Tracing, Replay) 90.73 kB +0.53% +478 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.66 kB +0.52% +479 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.87 kB +0.49% +468 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.83 kB +0.5% +489 B 🔺
CDN Bundle - uncompressed 94.33 kB +1.24% +1.15 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.19 kB +0.74% +1.15 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.87 kB +1.16% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.14 kB +0.72% +1.15 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 230.91 kB +0.51% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.35 kB +0.42% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.3 kB +0.41% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.06 kB +0.4% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 296.99 kB +0.39% +1.15 kB 🔺
@sentry/nextjs (client) 57.45 kB +1.08% +613 B 🔺
@sentry/sveltekit (client) 53.24 kB +1.51% +789 B 🔺
@sentry/core/server 42.78 kB +4.01% +1.65 kB 🔺
@sentry/core/browser 13.81 kB - -
@sentry/node 155.73 kB +0.42% +645 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 84.06 kB - -
@sentry/node - without tracing 97.41 kB +0.66% +634 B 🔺
@sentry/node - without channel injection 133.72 kB +0.46% +607 B 🔺
@sentry/aws-serverless 105.63 kB +0.67% +696 B 🔺
@sentry/cloudflare (withSentry) - minified 212.87 kB +0.94% +1.98 kB 🔺
@sentry/cloudflare (withSentry) 527.95 kB +0.92% +4.79 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 230.54 kB +0.87% +1.98 kB 🔺

View base workflow run

@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 19cfdcb to e1da135 Compare October 15, 2026 17:36
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from e1da135 to 8bd81ed Compare October 15, 2026 17:44
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch 2 times, most recently from 1404a52 to 45ea3d1 Compare October 15, 2026 18:26
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 45ea3d1 to b227d1c 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-react-router branch from b227d1c to 808fd83 Compare October 16, 2026 01:51
@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-react-router branch from 808fd83 to 7d51d31 Compare October 16, 2026 02:25
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 7d51d31 to c8efd24 Compare October 16, 2026 03:32
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch 2 times, most recently from 94ce573 to 3d0c6ae Compare October 16, 2026 04:48
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 3d0c6ae to c5bc1f3 Compare October 16, 2026 14:00
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from c5bc1f3 to 268adff Compare October 16, 2026 14:37
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from c0246f5 to 1ccbbae Compare October 19, 2026 04:58
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 1ccbbae to 07355e9 Compare October 19, 2026 15:32
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 5351cff to a07b864 Compare October 19, 2026 17:08
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch 2 times, most recently from 07f08ee to c53a75b Compare October 19, 2026 18:15
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from c53a75b to a4d4684 Compare October 19, 2026 18:22
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from a4d4684 to 0ede6d8 Compare October 19, 2026 18:36
@logaretm
logaretm force-pushed the awad/tunnel-react-router branch from 0ede6d8 to 88b440e Compare October 19, 2026 19:12
@logaretm
logaretm marked this pull request as ready for review October 19, 2026 19:37
@logaretm
logaretm requested a review from a team as a code owner October 19, 2026 19:37
@logaretm
logaretm requested review from mydea and s1gr1d and removed request for a team October 19, 2026 19:37

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

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 88b440e. Configure here.

tunnelServerSpanPromise.then(() => 'tunnel' as const),
anchorSpanPromise.then(() => 'anchor' as const),
]);
expect(winner).toBe('anchor');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Span wait depends on flush order

Low Severity

Flagged because the review rules file warns against races when waiting on multiple telemetry items. The test uses Promise.race between the tunnel span and a later /performance span and assumes streamed spans arrive in request order, which is not guaranteed.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 88b440e. Configure here.

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.

React Router Framework managed tunnel

1 participant