bun: Channel injection is unavailable under `bun run`, and only a debug log says so
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- backend, observability
Research direction
Start in packages/server-utils/src/orchestrion/runtime/register.ts around line 126 and trace detectOrchestrionSetup, registerDiagnosticsChannelInjection, and the existing warnRuntimeUnavailable path. Make the Bun no-injection warning always-on through consoleSandbox, identify @sentry/bun/plugin as the fix, and preserve debug-only behavior on Node.
Written by the indexing model from the issue text.
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/register.ts:126).
$ bun run init-probe.mjs
ORCHESTRION MARKER: {"runtimeUnavailable":true}
INTEGRATIONS: 42 ... Graphql,Mongo,Mongoose,Mysql,Mysql2,Redis,Postgres,
Prisma,Tedious,GenericPool,Kafka,Amqplib,LruMemoizer,Aws,LangChain,LangGraph,
VercelAI,OpenAI,Anthropic_AI,Google_GenAI,PostgresJs,Firebase
Sentry Logger [warn]: [Sentry] No diagnostics-channel injection detected...
Twenty-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.
Note 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.
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.
**Prior art **(tracked). Two open issues describe the symptom without naming the cause: #14202 (open since 2024-11) "Integrations not working for Bun", and #17779 (open). #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.
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 521
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-javascript
-
Flaky Test React Router Framework Spans Tests
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-javascript#24348 · 1 comment ·
-
javascript
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getsentry/sentry-javascript#24200 · 2 comments ·
-
javascript Task
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getsentry/sentry-javascript#24134 · 1 comment ·
-
Cloudflare Workers javascript Tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-javascript#24051 · 1 comment ·
-
Bug Bun javascript
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
getsentry/sentry-javascript#24045 · 1 comment ·
All issues in getsentry/sentry-javascript
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100