Repository navigation
Conversation
…etected Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d609f13. Configure here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
I will leave the final call up to @isaacs around the PR but wanted to share a thought: We should be careful when we log to the console without the debug gate. Not sure if this could trickle down to end users who suddenly get Sentry output in their console.
Have we considered adjusting the warning message like in this PR but keeping the debug gate?
|
Fair concern, but making it visible without |
…talled The Bun warning for missing channel injection showed even when no integration uses the channels, for example with `initWithoutDefaultIntegrations()` or `defaultIntegrations: false`. In those setups nothing is lost, the message is false, and the user has no way to turn it off. Every integration that needs channel injection subscribes through `invokeOrchestrionInstrumentation()`. The helper now sets `channelIntegrations` on the orchestrion marker, and `detectOrchestrionSetup()` shows the Bun warning only when that flag is set. This needs no list of integration names to keep in sync. Integrations that do not need injection, such as Fastify, do not call the helper and do not set the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion warning The Bun warning fires whenever no injection marker exists, not only under `bun run`. A `bun build --compile` binary or a `Bun.build` bundle made without `@sentry/bun/plugin` gets the same warning, and the advice to build with the plugin is right for those too. Only the `bun run` phrase was wrong, so the message now gives the real cause: Bun cannot instrument modules at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Node's `_init` still replaces the client on a repeated `Sentry.init()`, and it calls `detectOrchestrionSetup()` each time. The Bun warning is always on, so a second `init()` showed it again. The warning now sets `warnedBunRunNotInjected` on the orchestrion marker and does not show again while it is set. The flag lives on the marker, not in module state, so duplicate SDK copies in one process also warn only once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This is the smallest patch which could solve the problem, which is always the best place to start :) Re the concern @Lms24 raises, and @lazerg's response, I actually think you're both right. We do need the warning to print for I added a flag to the orchestrion marker, so that on bun we can know for certain if the user is in that state where the warning would be applicable, instead of just inferring it from their platform. With that change, I think this is ready to land, so I'll get that landed as soon as CI is complete. |
|
Thanks, checking the marker flag is much better than guessing from the platform. One heads-up: the Bun integration jobs on 8e27791 fail because the warning now prints in |
…output checks The Bun integration jobs run the Node suites with `bun run` and without `@sentry/bun/plugin`, so the SDK now warns on stderr that channel injection is missing. `ensureNoErrorOutput()` failed on that warning in `esm/modules-integration` and `tracing/orchestrion-registration-only`. When `RUNTIME` is `bun`, the runner now drops that warning line before it checks stderr. Other output on the same chunk still fails the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Why: Under
bun runthere is noModule.registerHooks, so the runtime injection never registers and the channel integrations stay silent, including their error capture. The only hint was adebug.warn, so on Bun this is now an always-onconsoleSandboxwarning that points to@sentry/bun/plugin. Node keeps the debug-only message.Closes #23882