Skip to content

feat: Accept tunnel: true in init to enable the managed tunnel - #25200

Draft
logaretm wants to merge 1 commit into
awad/tunnel-core-dsn-pathfrom
awad/tunnel-browser-managed
Draft

logaretm wants to merge 1 commit into
awad/tunnel-core-dsn-pathfrom
awad/tunnel-browser-managed

Conversation

@logaretm

@logaretm logaretm commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

There was no way to turn on a managed tunnel from init, fixed by accepting tunnel: true so the browser sends to the DSN-derived path and server SDKs flag that they serve it.

The tests check the browser path matches what the server accepts, the new envelope content type, and that server SDKs keep sending their own events directly.

@logaretm
logaretm added this pull request to stack #25201 October 8, 2026 15:45
Setting `tunnel: true` (or `{ allowedDsns, basePath, trailingSlash }`) in both
the browser and the server `init` enables the managed tunnel. The browser
resolves it to the DSN-derived same-origin path and sends envelopes as
`application/x-sentry-envelope`, because SvelteKit and Astro CSRF checks reject
a same-origin `text/plain` POST. Server SDKs keep their own envelopes going
directly to Sentry and set `_managedTunnel` for their request handlers.
@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

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 30.07 kB +0.91% +271 B 🔺
@sentry/browser - with treeshaking flags 28.17 kB +0.89% +247 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.07 kB +0.83% +229 B 🔺
@sentry/browser (incl. Tracing) 52.13 kB +0.55% +280 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.14 kB +0.53% +271 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.06 kB +0.48% +262 B 🔺
@sentry/browser (incl. Tracing, Replay) 91.84 kB +0.29% +262 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.71 kB +0.33% +265 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 96.58 kB +0.31% +292 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 109.53 kB +0.24% +260 B 🔺
@sentry/browser (incl. Feedback) 47.59 kB +0.59% +278 B 🔺
@sentry/browser (incl. sendFeedback) 35.12 kB +0.81% +282 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.21 kB +0.64% +254 B 🔺
@sentry/browser (incl. Metrics) 31.07 kB +0.8% +246 B 🔺
@sentry/browser (incl. Logs) 31.35 kB +0.8% +246 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.03 kB +0.88% +278 B 🔺
@sentry/react 31.88 kB +0.79% +248 B 🔺
@sentry/react (incl. Tracing) 54.43 kB +0.47% +254 B 🔺
@sentry/vue 38.1 kB +0.7% +263 B 🔺
@sentry/vue (incl. Tracing) 55.02 kB +0.46% +249 B 🔺
@sentry/svelte 30.09 kB +0.9% +267 B 🔺
@sentry/remix (Remix 3 client bundle) 57.15 kB +0.57% +319 B 🔺
CDN Bundle 31.76 kB +0.74% +231 B 🔺
CDN Bundle (incl. Tracing) 52.59 kB +0.47% +244 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.95 kB +0.68% +228 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 54.55 kB +0.47% +250 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 74.88 kB +0.31% +228 B 🔺
CDN Bundle (incl. Tracing, Replay) 90.26 kB +0.27% +243 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.23 kB +0.29% +266 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.4 kB +0.24% +229 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.38 kB +0.24% +232 B 🔺
CDN Bundle - uncompressed 93.49 kB +0.62% +570 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 156.03 kB +0.37% +570 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.03 kB +0.58% +570 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.98 kB +0.36% +570 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 230.06 kB +0.25% +570 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 276.2 kB +0.21% +570 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 282.14 kB +0.21% +570 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.9 kB +0.2% +570 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.83 kB +0.2% +570 B 🔺
@sentry/nextjs (client) 56.79 kB +0.46% +259 B 🔺
@sentry/sveltekit (client) 52.49 kB +0.5% +261 B 🔺
@sentry/core/server 40.86 kB - -
@sentry/core/browser 13.71 kB - -
@sentry/node 150.9 kB +0.04% +53 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.56 kB - -
@sentry/node - without tracing 94.02 kB +0.06% +49 B 🔺
@sentry/node - without channel injection 129.04 kB +0.05% +56 B 🔺
@sentry/aws-serverless 102.22 kB +0.08% +77 B 🔺
@sentry/cloudflare (withSentry) - minified 209.96 kB +0.08% +149 B 🔺
@sentry/cloudflare (withSentry) 520.58 kB +0.07% +355 B 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 227.63 kB +0.07% +149 B 🔺

View base workflow run

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.

1 participant