Title: bun: Channel injection is unavailable under `bun run`, and only a debug log says so · Issue #23882 · getsentry/sentry-javascript · GitHub
Open Graph Title: bun: Channel injection is unavailable under `bun run`, and only a debug log says so · Issue #23882 · getsentry/sentry-javascript
X Title: bun: Channel injection is unavailable under `bun run`, and only a debug log says so · Issue #23882 · getsentry/sentry-javascript
Description: registerDiagnosticsChannelInjection takes its fallback branch on Bun. Module.registerHooks is undefined in bun 1.3.14, and the Module.register branch is explicitly gated on !globalAny.Bun (packages/server-utils/src/orchestrion/runtime/re...
Open Graph Description: registerDiagnosticsChannelInjection takes its fallback branch on Bun. Module.registerHooks is undefined in bun 1.3.14, and the Module.register branch is explicitly gated on !globalAny.Bun (packages...
X Description: registerDiagnosticsChannelInjection takes its fallback branch on Bun. Module.registerHooks is undefined in bun 1.3.14, and the Module.register branch is explicitly gated on !globalAny.Bun (packages...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/23882
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bun: Channel injection is unavailable under `bun run`, and only a debug log says so","articleBody":"`registerDiagnosticsChannelInjection` takes its fallback branch on Bun. `Module.registerHooks` is `undefined` in bun 1.3.14, and the `Module.register` branch is explicitly gated on `!globalAny.Bun` (`packages/server-utils/src/orchestrion/runtime/register.ts:126`).\n\n```\n$ bun run init-probe.mjs\nORCHESTRION MARKER: {\"runtimeUnavailable\":true}\nINTEGRATIONS: 42 ... Graphql,Mongo,Mongoose,Mysql,Mysql2,Redis,Postgres,\nPrisma,Tedious,GenericPool,Kafka,Amqplib,LruMemoizer,Aws,LangChain,LangGraph,\nVercelAI,OpenAI,Anthropic_AI,Google_GenAI,PostgresJs,Firebase\nSentry Logger [warn]: [Sentry] No diagnostics-channel injection detected...\n```\n\nTwenty-two channel integrations report `Integration installed` and then never fire. The only signal is `debug.warn` inside `detectOrchestrionSetup`, which is off unless the user sets `debug: true`.\n\nNote that these integrations also handle error capture, not only spans, so a Bun user running `bun run` loses Express/Fastify/Koa/Hapi error capture too.\n\n**Work item.** Promote the \"no injection detected\" message to an always-on `consoleSandbox` warning on Bun (matching `warnRuntimeUnavailable`, which already exists for the failure path), and name the fix: build with `@sentry/bun/plugin`. Keep it debug-only on Node, where the runtime hook normally succeeds.\n\n**Prior art ***(tracked)*. Two open issues describe the symptom without naming the cause: [#14202](\u003chttps://github.com/getsentry/sentry-javascript/issues/14202>) (open since 2024-11) \"Integrations not working for Bun\", and [#17779](\u003chttps://github.com/getsentry/sentry-javascript/issues/17779>) (open). [#19696](\u003chttps://github.com/getsentry/sentry-javascript/issues/19696>) (closed) \"None of the AI auto-instrumentations work with Sentry Bun\" is the same report for the AI integrations. The build-time fix shipped in getsentry/sentry-javascript#21410 (merged, the Bun build plugin). There is precedent for the always-on warning proposed here: getsentry/sentry-javascript#22379 (merged) warns when a bundler config externalizes an instrumented module. No issue covers promoting this particular warning.","author":{"url":"https://github.com/isaacs","@type":"Person","name":"isaacs"},"datePublished":"2026-09-02T04:48:39Z","url":"https://github.com/getsentry/sentry-javascript/issues/23882"}
| 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:f0afaf1b-b1c9-fb1c-fcc9-3735a6b0c2fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A764:5A410:3B02D0:5004A3:6B04395B |
| html-safe-nonce | e228227bce82b251b1b8518a14047faf6365e864e906f8b9784075f5dc54ec0d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzY0OjVBNDEwOjNCMDJEMDo1MDA0QTM6NkIwNDM5NUIiLCJ2aXNpdG9yX2lkIjoiNTUwODU2OTI4MTQ3NjE4MDMxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e8a472231345a51254d05561225cac7e0c7fa2d62f7c3275c0011b75a4530d12 |
| hovercard-subject-tag | issue:5319854970 |
| 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/23882/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e2cffaa4949c7432ea9cc8463a316b7d019ae2abd58fbd7a4b4a4d5957b9a4b5/getsentry/sentry-javascript/issues/23882 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e2cffaa4949c7432ea9cc8463a316b7d019ae2abd58fbd7a4b4a4d5957b9a4b5/getsentry/sentry-javascript/issues/23882 |
| og:image:alt | registerDiagnosticsChannelInjection takes its fallback branch on Bun. Module.registerHooks is undefined in bun 1.3.14, and the Module.register branch is explicitly gated on !globalAny.Bun (packages... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | isaacs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| 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 | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| 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