Skip to content

fix(cli): stop Sentry warning on every run of the Bun binary - #424

Merged
designcode merged 1 commit into
mainfrom
aibrahim/cli-sentry-bun-warning
Nov 19, 2026
Merged

designcode merged 1 commit into
mainfrom
aibrahim/cli-sentry-bun-warning

Conversation

@designcode

@designcode designcode commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The standalone tigris binary (built with bun build --compile) prints this on every command:

[Sentry] No diagnostics-channel injection detected. Channel-based integrations will not record spans or capture errors, because Bun cannot instrument modules at runtime. Build your app with `@sentry/bun/plugin` to enable them.

Telemetry kept every Sentry default integration except a denylist. The defaults include Express, Fastify, Hapi, Hono, Koa and Nitro integrations, which instrument those libraries through diagnostics channels. Bun can't inject those, so init() warns on stderr. Under Node the same check is only a debug log, so the npm-installed CLI is quiet.

Change

selectIntegrations now keeps an allowlist, ENABLED_INTEGRATIONS: EventFilters, FunctionToString, LinkedErrors, Dedupe, NodeSystemError, Http, NodeFetch, WorkerThreads and Modules. That is what we kept before, minus the six framework integrations and the server-only RequestData, ConversationId and AwsLambdaWeb. New Sentry releases keep adding defaults (databases, AI libraries), so an allowlist stops the next one from bringing the warning back. The reasons for leaving out the user-data and exit-delaying integrations stay in the comment.

Testing

  • Rebuilt the binary with build:binary:current (@sentry/node 11.14.0, Bun 1.3.9): ./bin/tigris whoami printed the warning before the change and doesn't after.
  • Tests check that every allowlisted name is still a Sentry default (so an upstream rename fails loudly), that the user-data and exit-delaying integrations stay off, and that the framework integrations stay off.
  • Not verified: end-to-end delivery of a Sentry event from the binary. The existing telemetry tests cover capture.

🤖 Generated with Claude Code


Note

Low Risk
Telemetry-only change with tightened Sentry integration selection; behavior is covered by unit tests and should not affect CLI command logic.

Overview
Switches CLI Sentry setup from a denylist (DISABLED_INTEGRATIONS) to an allowlist (ENABLED_INTEGRATIONS) so selectIntegrations only turns on integrations needed for crash reporting (EventFilters, Http, LinkedErrors, etc.).

That stops the Bun-compiled tigris binary from emitting the recurring "No diagnostics-channel injection detected" warning: new SDK defaults for server frameworks (Express, Fastify, etc.) are no longer enabled by default, and future defaults won't slip through a denylist.

Tests now assert every allowlisted name still exists in Sentry defaults, and that user-data, exit-delaying, and framework integrations stay off.

Reviewed by Cursor Bugbot for commit 3171892. Bugbot is set up for automated code reviews on this repo. Configure here.

Telemetry kept all Sentry default integrations except a denylist, which
included web framework integrations. Under Bun they can't be injected and
Sentry warns "No diagnostics-channel injection detected" on every command.
Switch to an allowlist of the integrations error reporting needs.

Assisted-by: Claude Opus 5.5 via Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The CLI now selects Sentry integrations from an explicit allowlist to avoid framework-related warnings in the Bun binary.

  • The CLI’s Sentry setup avoids Bun’s diagnostics-channel warning.

No actionable issues found. Tests were not run because dependencies are not installed.

Reviews (1) · Last reviewed commit: "fix(cli): stop Sentry warning on every r..." · Reviewed by Greptile

@designcode
designcode merged commit 00ed2d3 into main Nov 19, 2026
3 checks passed
@designcode
designcode deleted the aibrahim/cli-sentry-bun-warning branch November 19, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants