Title: Investigate build-time instrumentation for meta framework dev-servers · Issue #22857 · getsentry/sentry-javascript · GitHub
Open Graph Title: Investigate build-time instrumentation for meta framework dev-servers · Issue #22857 · getsentry/sentry-javascript
X Title: Investigate build-time instrumentation for meta framework dev-servers · Issue #22857 · getsentry/sentry-javascript
Description: Using this ticket for a follow up task to enable orchestrion in dev mode. Clanker output for the astro case below 🔽 Context Follow-up from #22830 (auto-wiring the orchestrion bundler plugin in @sentry/astro). Orchestrion build-time instr...
Open Graph Description: Using this ticket for a follow up task to enable orchestrion in dev mode. Clanker output for the astro case below 🔽 Context Follow-up from #22830 (auto-wiring the orchestrion bundler plugin in @sen...
X Description: Using this ticket for a follow up task to enable orchestrion in dev mode. Clanker output for the astro case below 🔽 Context Follow-up from #22830 (auto-wiring the orchestrion bundler plugin in @sen...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/22857
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Investigate build-time instrumentation for meta framework dev-servers","articleBody":"Using this ticket for a follow up task to enable orchestrion in dev mode. Clanker output for the astro case below 🔽 \n\n### Context\n\nFollow-up from #22830 (auto-wiring the orchestrion bundler plugin in `@sentry/astro`).\n\nOrchestrion build-time instrumentation works in production (`astro build` + `node ./dist/server/entry.mjs`), but a dev-mode e2e run (`astro dev`) against the same app did **not** produce DB spans.\n\n### Observed\n\nRunning the `astro-7-orchestrion` e2e suite with `TEST_ENV=development` (`astro dev --port 3030`):\n\n- Dev server starts cleanly (Astro v7.1.6), DB containers healthy.\n- The `http.server` transaction for `GET /db-ioredis` / `GET /db-mysql` **does** arrive.\n- But **no `db` spans** are attached → the transaction-with-span assertion times out.\n- The production run of the exact same tests passes.\n\nRuntime subscribers register fine in dev (`[orchestrion:ioredis] subscribing…`, `[orchestrion:mysql] subscribing…`); it's the publisher-side transform that appears not to fire.\n\n### Suspected mechanism (not fully confirmed)\n\nThe publisher injection is the code-transformer's `transform` hook, which splices `diagnostics_channel.publish` into the driver source. That hook is **not** build-gated, so in principle it can run in dev serve — but only if `astro dev` routes the instrumented CJS `node_modules` packages (`ioredis`, `mysql`) through Vite's SSR transform pipeline.\n\nThe plugin uses:\n- `config()` → `ssr.noExternal: [instrumented modules]` to force-bundle them, and\n- `applyToEnvironment(env => env.config.consumer === 'server')`.\n\nThe hypothesis is that under Astro 7's dev SSR module loader, the instrumented deps are not pulled through the transform (externalized / loaded raw via Node, and/or the dev SSR environment's `consumer` doesn't satisfy the `applyToEnvironment` guard), so `transform` never sees the driver source. This needs confirmation by instrumenting the transform (log each `id` it receives in dev) or tracing Astro 7 dev SSR resolution.\n\n### Scope note\n\nAll existing orchestrion e2e apps (`nuxt-4-orchestrion`, `sveltekit-2-orchestrion`) are production-only, so this is not an astro-specific regression — it's an open question about whether build-time orchestrion can/should work under any Vite dev server. Tracking here so the dev-mode gap is investigated rather than assumed.","author":{"url":"https://github.com/chargome","@type":"Person","name":"chargome"},"datePublished":"2026-07-30T11:34:09Z","url":"https://github.com/getsentry/sentry-javascript/issues/22857"}
| 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:b8b4720a-bb48-9b06-e6d9-92be6af0f4ff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A154:237D74:83463B:B24E56:6B0448DB |
| html-safe-nonce | 8f6ea48694e6ba1e54829d6e15dea49a14f3c9008769354d33fe20d93ca6a7cd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTU0OjIzN0Q3NDo4MzQ2M0I6QjI0RTU2OjZCMDQ0OERCIiwidmlzaXRvcl9pZCI6IjMyNTgyNjA1MTI5MzIzODI5MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c3f028fb558eba77470d9fb6f1ed40b5596067d815fcf46d9d7fdcc9a5bf0ee4 |
| hovercard-subject-tag | issue:5019272083 |
| 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/22857/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2d410ae979431fc4a218fa78c1bb50e9624024bd5dafd3a3510ecfd451306b0e/getsentry/sentry-javascript/issues/22857 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2d410ae979431fc4a218fa78c1bb50e9624024bd5dafd3a3510ecfd451306b0e/getsentry/sentry-javascript/issues/22857 |
| og:image:alt | Using this ticket for a follow up task to enable orchestrion in dev mode. Clanker output for the astro case below 🔽 Context Follow-up from #22830 (auto-wiring the orchestrion bundler plugin in @sen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chargome |
| 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