Repository navigation
feat(server-utils): Always warn on Bun when no channel injection is detected #25857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
isaacs
merged 6 commits into
getsentry:develop
from
lazerg:fix/bun-no-injection-warning-23882
Nov 5, 2026
+145
−5
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d609f13
feat(server-utils): Always warn on Bun when no channel injection is d…
lazerg 4a37529
test(bun): Cover the missing channel injection warning under bun run
lazerg 4d915f4
fix(server-utils): Only warn on Bun when a channel integration is ins…
isaacs e50c8f3
fix(server-utils): Do not name `bun run` in the missing channel injec…
isaacs 8e27791
fix(server-utils): Show the Bun missing channel injection warning once
isaacs e4b6c97
test(node): Allow the Bun missing channel injection warning in error …
isaacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
dev-packages/bun-integration-tests/suites/no-channel-injection/scenario-no-integrations.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import * as Sentry from '@sentry/bun'; | ||
|
|
||
| Sentry.initWithoutDefaultIntegrations({ | ||
| dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
| tracesSampleRate: 1.0, | ||
| }); |
6 changes: 6 additions & 0 deletions
6
dev-packages/bun-integration-tests/suites/no-channel-injection/scenario.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import * as Sentry from '@sentry/bun'; | ||
|
|
||
| Sentry.init({ | ||
| dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
| tracesSampleRate: 1.0, | ||
| }); |
22 changes: 22 additions & 0 deletions
22
dev-packages/bun-integration-tests/suites/no-channel-injection/test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { spawnSync } from 'child_process'; | ||
| import { join } from 'path'; | ||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| function runScenario(file: string): string { | ||
| const res = spawnSync('bun', ['run', join(__dirname, file)], { cwd: __dirname, encoding: 'utf8' }); | ||
| expect(res.status, `run failed:\nstderr:\n${res.stderr}\nstdout:\n${res.stdout}`).toBe(0); | ||
| return `${res.stdout}${res.stderr}`; | ||
| } | ||
|
|
||
| describe('no channel injection (Bun)', () => { | ||
| it('warns without `debug` when the app runs unbuilt with `bun run`', () => { | ||
| const output = runScenario('scenario.ts'); | ||
|
|
||
| expect(output).toContain('No diagnostics-channel injection detected'); | ||
| expect(output).toContain('@sentry/bun/plugin'); | ||
| }); | ||
|
|
||
| it('does not warn when no channel integration is installed', () => { | ||
| expect(runScenario('scenario-no-integrations.ts')).not.toContain('No diagnostics-channel injection detected'); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.