Title: Guard server runtime entries against pulling in build-time tooling · Issue #25676 · getsentry/sentry-javascript · GitHub
Open Graph Title: Guard server runtime entries against pulling in build-time tooling · Issue #25676 · getsentry/sentry-javascript
X Title: Guard server runtime entries against pulling in build-time tooling · Issue #25676 · getsentry/sentry-javascript
Description: Since server-side tracing in v11 relies on build-time instrumentation, build tooling keeps leaking into server runtime bundles: bundler plugins, oxc-parser, orchestrion's bundler transforms, Vite/webpack/Babel and WASM. Each time this su...
Open Graph Description: Since server-side tracing in v11 relies on build-time instrumentation, build tooling keeps leaking into server runtime bundles: bundler plugins, oxc-parser, orchestrion's bundler transforms, Vite/w...
X Description: Since server-side tracing in v11 relies on build-time instrumentation, build tooling keeps leaking into server runtime bundles: bundler plugins, oxc-parser, orchestrion's bundler transforms, Vi...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/25676
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Guard server runtime entries against pulling in build-time tooling","articleBody":"Since server-side tracing in v11 relies on build-time instrumentation, build tooling keeps leaking into server runtime bundles: bundler plugins, `oxc-parser`, orchestrion's bundler transforms, Vite/webpack/Babel and WASM. Each time this surfaces as a different user-facing breakage, depending on what consumes the server entry. Some examples:\n\n- #22794: the Next.js server entry reached `withSentryConfig`, which pulled orchestrion WASM into a workerd bundle (CompileError)\n- #23034: `meriyah` missing from Next standalone output\n- #23243: SvelteKit pulls in `@babel/core`\n- #24775: Nuxt/Nitro inlining breaks\n- #25470: SvelteKit 3 / Azure bundling of `pg`\n\nUsers usually find these, often in production deploys, and nothing stops the same shape from coming back. `dev-packages/bundler-tests` only covers a basic fixture and does not check what a runtime entry may reach.\n\n### Proposal\n\n1. **Add a runtime import-graph guard in CI.** For every server runtime entry, resolve the full import graph (esbuild metafile and/or `@vercel/nft`, which matches what Next standalone and similar tools trace). Fail if the graph reaches build-only code, e.g. `@sentry/bundler-plugins`, `oxc-parser`, `@sentry/server-utils/orchestrion/bundler/*`, `vite`, `webpack`, `rollup`, `@babel/*` or `*.wasm`. The entries to check:\n - `@sentry/node` (`.`)\n - each meta-framework's server entry (nextjs, nuxt, sveltekit, astro, react-router, remix, tanstackstart, solidstart)\n - `@sentry/cloudflare`, `@sentry/bun`, `@sentry/deno` and `@sentry/vercel-edge`\n\n The set of runtime entries is small and enumerable, so the guard is cheap to maintain and turns this class of regressions into a PR-time failure.\n\n2. **Fix the violations the guard finds.** One known case is `@sentry/astro`: its `.` export (node condition → `index.server`) is both the Astro integration (`export default sentryAstro`, used in `astro.config`) and the server runtime SDK. Through `packages/astro/src/integration/index.ts`, the runtime entry therefore imports `@sentry/bundler-plugins/vite`, `@sentry/server-utils/orchestrion/vite`, `fs` and `createRequire`. Fixing it needs a separate config entry (or an equivalent split), so it needs a decision on how to stay backwards compatible with `import sentry from '@sentry/astro'` in `astro.config`.\n\nOut of scope here: changing package `dependencies`, e.g. #24849 (`@sentry/node` depending on `@sentry/bundler-plugins`). That affects install footprint, not what ends up in bundles, and changing it would be breaking.\n","author":{"url":"https://github.com/mydea","@type":"Person","name":"mydea"},"datePublished":"2026-10-23T07:08:47Z","url":"https://github.com/getsentry/sentry-javascript/issues/25676"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bc58a2dc-7e58-0eb3-7456-16d79f941717 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5B0:13A804:10159E4:16952D0:6B044A99 |
| html-safe-nonce | c24c397abea9d9c0cbd6ca6ae1829a118c8bc32586b1718a0d46de2f4c7a8760 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUIwOjEzQTgwNDoxMDE1OUU0OjE2OTUyRDA6NkIwNDRBOTkiLCJ2aXNpdG9yX2lkIjoiNDA4MTY4MTYxNDE3Mjg2NzIyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 09331b1f13cc4ed2e4b4052d9acfd4414a462360e849fcaba8dc6faf7e4792e2 |
| hovercard-subject-tag | issue:5993538811 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/25676/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca4e5c5a5a9cd08ebee57635494936c4253a7826b30c378e9052e8c1243bc318/getsentry/sentry-javascript/issues/25676 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca4e5c5a5a9cd08ebee57635494936c4253a7826b30c378e9052e8c1243bc318/getsentry/sentry-javascript/issues/25676 |
| og:image:alt | Since server-side tracing in v11 relies on build-time instrumentation, build tooling keeps leaking into server runtime bundles: bundler plugins, oxc-parser, orchestrion's bundler transforms, Vite/w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mydea |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width