Repository navigation
Conversation
size-limit report 📦Compared: 9eab265 (PR test merge using develop at 8719ead) Against: 03492d2 (develop) · base run #65336
|
Optional E2E testsAll optional checks were successful. 13 successful. See the run. Successful checks
|
80937ea to
05739c4
Compare
8290699 to
5070a1e
Compare
2df929e to
37ff5cc
Compare
37ff5cc to
d4ee2c6
Compare
d4ee2c6 to
df4b1de
Compare
f0a9f77 to
e9a696a
Compare
0fd8b56 to
8afd0fe
Compare
8afd0fe to
38a15ca
Compare
38a15ca to
b2ef19c
Compare
|
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. |
b2ef19c to
2219517
Compare
2219517 to
6737894
Compare
isaacs
left a comment
There was a problem hiding this comment.
The direction is right. One place per runtime is simpler than one per framework, and the CI results show that the runtime hooks fully replace the framework hooks on Node, Bun, Deno and Cloudflare, in dev and in production. The removed code was a source of edge cases (h3 layer order, route rule headers, React Router's lazy route paths, TanStack's entry cloning), and dropping it is a real gain.
The cost is coverage. The framework hooks also served the tunnel on platforms where the SDK has no runtime hook: Vercel Edge for certain, and most likely Netlify, Nitro serverless presets, and maybe Vercel Node functions. 11.10 users on those platforms would lose a working tunnel in a minor release, and no test would notice. I'd keep the cheap framework hooks (SvelteKit handle, Astro middleware, Nitro fetch wrapper, React Router routes) as a fallback that only runs when no runtime hook answered first. I'd remove only the parts that cost something. Then I'd clean up the names that no longer describe their behavior, and test the new Astro entry injection.
ad545e3 to
2dab884
Compare
02bfd30 to
53c1064
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 53c1064. Configure here.
| import { DEBUG_BUILD } from '../common/debug-build'; | ||
|
|
||
| // Never matches a request, for when the managed tunnel is off. | ||
| const DISABLED_TUNNEL_PATH = '/__sentry-tunnel-disabled__'; |
There was a problem hiding this comment.
Tunnel missing on serverless adapters
High Severity
These frameworks now only call setTunnelDefaults and no longer intercept the request. Runtime hooks cover node:http, Bun.serve, Deno.serve, Cloudflare withSentry, and Lambda preload. Vercel and Netlify serverless adapters export a fetch handler, so managed tunnel POSTs fall through to the app. SvelteKit, Astro, and Remix still have a cheap fallback; React Router, TanStack Start, and Nitro-based apps do not.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 53c1064. Configure here.
| export { createSentryHandleError, type SentryHandleErrorOptions } from './createSentryHandleError'; | ||
| export { getMetaTagTransformer } from './getMetaTagTransformer'; | ||
| export { createSentryTunnelRoutes } from './tunnelRoute'; | ||
| export { setTunnelBasePath as _INTERNAL_setTunnelBasePath } from './tunnelRoute'; |
There was a problem hiding this comment.
Public tunnel route helper removed
Medium Severity
createSentryTunnelRoutes was a named export from @sentry/react-router and @sentry/react-router/cloudflare. This change deletes that public function and replaces it with _INTERNAL_setTunnelBasePath, with no deprecation and no changelog note. Flagged because the review rules require deprecation or a migration callout before removing a publicly exported function.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 53c1064. Configure here.
31cb2bd to
0b6fa6b
Compare
The runtimes answer managed tunnel requests before any framework sees them, so the per-framework hooks in Astro, Nitro, Nuxt, React Router, Remix, SolidStart, SvelteKit and TanStack Start go. The frameworks only set the tunnel's base path. Astro now initializes the server SDK from the server entry in builds, which the late init in its middleware used to cover.
…what they do now `createSentryTunnelRoutes` created no routes and `wrapServerEntryWithSentryTunnel` wrapped nothing since the runtime answers tunnel requests. They're now `_INTERNAL_setTunnelBasePath` and `_INTERNAL_setTunnelRoute`, which the generated code calls for their side effect.
…'s own request hook Where no runtime hook answers tunnel requests, like on Vercel Edge, the request hook these SDKs already run is the only place left to answer them. It's one call, and where a runtime hook exists it answers first.
0b6fa6b to
e1272c3
Compare


At this point, we handle the runtimes we support, so the previous framework-specific wiring is no longer needed.
This PR adjusts a couple of wiring for some safety around double inits in serverless environments, and cleans up most of the old code introduced in
11.10.Note for reviewers: if you are lacking context on this PR, check #25997