Skip to content

fix(browser): Accept managed tunnel options in the BrowserClient constructor - #26313

Merged
logaretm merged 1 commit into
developfrom
awad/js-4099-sentryreact-11100-to-11120
Nov 12, 2026
Merged

logaretm merged 1 commit into
developfrom
awad/js-4099-sentryreact-11100-to-11120

Conversation

@logaretm

@logaretm logaretm commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Since 11.10 BrowserOptions couldn't be passed to new BrowserClient() because only init() resolved the managed tunnel, fixed by accepting and resolving it in the client constructor.

Unlike the issue diagnosis, the type should be widened in the spots that I did, otherwise some SDKs extending the type would fail to compile as well. I added type tests for spreading BrowserOptions into the constructor, and a unit test that tunnel: true resolves to the DSN path.

closes #26306

…nstructor

BrowserOptions could no longer be passed to new BrowserClient() since the
managed tunnel widened `tunnel`, and a hand-built client never resolved
`tunnel: true`. The constructor now accepts TunnelInit and resolves it.
@linear-code

linear-code Bot commented Nov 12, 2026

Copy link
Copy Markdown

JS-4099

@logaretm
logaretm marked this pull request as ready for review November 12, 2026 09:34
@logaretm
logaretm requested a review from a team November 12, 2026 09:34
@logaretm
logaretm requested a review from a team as a code owner November 12, 2026 09:34
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 739b4eb (PR test merge using develop at 27bc7cb)

Against: 27bc7cb (develop) · base run #65789

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.04 kB +0.01% +1 B 🔺
@sentry/browser - with treeshaking flags 28.23 kB -0.03% -6 B 🔽
@sentry/browser - with treeshaking flags tracing without tracing 28.12 kB -0.05% -14 B 🔽
@sentry/browser (incl. Tracing) 52.2 kB -0.03% -11 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 52.2 kB -0.03% -14 B 🔽
@sentry/browser (incl. Tracing, Profiling) 55.17 kB +0.01% +3 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.73 kB -0.02% -16 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.52 kB +0.02% +13 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.08 kB -0.02% -15 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 110.51 kB -0.01% -8 B 🔽
@sentry/browser (incl. Feedback) 47.66 kB +0.01% +2 B 🔺
@sentry/browser (incl. sendFeedback) 30.62 kB +0.02% +5 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.62 kB -0.04% -12 B 🔽
@sentry/browser (incl. Metrics) 31.36 kB +0.02% +5 B 🔺
@sentry/browser (incl. Logs) 31.64 kB +0.05% +13 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.3 kB +0.02% +6 B 🔺
@sentry/react 32.04 kB +0.01% +2 B 🔺
@sentry/react (incl. Tracing) 54.86 kB +0.04% +21 B 🔺
@sentry/vue 38.21 kB +0.05% +16 B 🔺
@sentry/vue (incl. Tracing) 55.14 kB +0.04% +21 B 🔺
@sentry/svelte 30.05 kB -0.04% -10 B 🔽
@sentry/remix (Remix 3 client bundle) 57.96 kB +0.07% +35 B 🔺
CDN Bundle 31.79 kB -0.02% -6 B 🔽
CDN Bundle (incl. Tracing) 52.58 kB +0.05% +26 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.58 kB +0.02% +4 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.14 kB +0.08% +39 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.61 kB -0.01% -7 B 🔽
CDN Bundle (incl. Tracing, Replay) 90.63 kB +0.04% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.25 kB +0.04% +28 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96 kB -0.02% -13 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.6 kB -0.02% -10 B 🔽
CDN Bundle - uncompressed 92.69 kB +0.02% +14 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 155.13 kB +0.01% +14 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.03 kB +0.02% +14 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 162.76 kB +0.01% +14 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.11 kB +0.01% +14 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.27 kB +0.01% +14 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 282.9 kB +0.01% +14 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.07 kB +0.01% +14 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 294.69 kB +0.01% +14 B 🔺
@sentry/nextjs (client) 58.23 kB -0.01% -1 B 🔽
@sentry/sveltekit (client) 53.26 kB +0.03% +11 B 🔺
@sentry/core/server 44.53 kB - -
@sentry/core/browser 13.99 kB - -
@sentry/node 149.2 kB -0.01% -7 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.16 kB - -
@sentry/node - without tracing 88.25 kB -0.01% -6 B 🔽
@sentry/node - without channel injection 138.18 kB -0.01% -4 B 🔽
@sentry/aws-serverless 97.11 kB -0.01% -4 B 🔽
@sentry/cloudflare (withSentry) - minified 204.19 kB - -
@sentry/cloudflare (withSentry) 473.88 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 229.5 kB - -

View base workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 3 not successful, 23 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Failing after 18s Details
❌ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Failing after 13s Details
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 11m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) 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 astro-7 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 nuxt-5 (tunnel-dev) Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) 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 nextjs-orpc 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 49s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details

@logaretm
logaretm merged commit 5e291ea into develop Nov 12, 2026
312 of 315 checks passed
@logaretm
logaretm deleted the awad/js-4099-sentryreact-11100-to-11120 branch November 12, 2026 10:41
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.

@sentry/react 11.10.0 to 11.12.0: BrowserOptions is no longer assignable to BrowserClient constructor options (TS2345 on tunnel)

3 participants