You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sentryBunPlugin should inject debug IDs and upload source maps, like the esbuild plugin #25618
The Bun guide recommends building with sentryBunPlugin from @sentry/bun/plugin, and we do (Bun 1.4.3, @sentry/bun 11.8.0) so pg queries become db spans. But that plugin only runs the orchestrion transform (@sentry/server-utils/orchestrion/bundler/bun.js). Getting readable server stack traces takes a second tool: build with sourcemap: "external", then sentry sourcemap inject and sentry sourcemap upload, plus setting the release ourselves. Without that, errors show frames like dist/index.js:169867 with js_no_source.
The Bun source maps page lists webpack, Rollup, Vite and esbuild under "Sentry Bundler Support", but not Bun, even though Bun is now the bundler the Bun guide tells you to use. The legacy sentry-cli that older docs point to silently skips Bun output (Bun writes its own //# debugId), so the manual path is easy to get wrong.
Solution Brainstorm
Let sentryBunPlugin take the same build options as sentryEsbuildPlugin (org, project, authToken, sourcemaps, release) and, when an auth token is present, inject the debug ID snippet (reusing the ID Bun already emits) and upload the maps at the end of Bun.build. Then add Bun to "Sentry Bundler Support" on the source maps page.
Hi thanks for writing in!
I added this to our Bun tracking issue, it makes sense to improve this and align with the other plugins. However, we first need to check whether we can upload source maps in the Bun.build run (onEnd).
Another approach would also be to add a bun adapter like the esbuild one, but that needs further discussion on how we're gonna approach this.
Activity
linear-code commentedon Oct 21, 2026
JS-3983
s1gr1d commentedon Oct 22, 2026
Hi thanks for writing in!
I added this to our Bun tracking issue, it makes sense to improve this and align with the other plugins. However, we first need to check whether we can upload source maps in the
Bun.buildrun (onEnd).Another approach would also be to add a
bunadapter like the esbuild one, but that needs further discussion on how we're gonna approach this.feat(bun): Inject debug IDs and upload source maps in `sentryBunPlugin`
feat(bun): Inject debug IDs and upload source maps in `sentryBunPlugi…
github-actions commentedon Oct 28, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #25670, which was included in the 11.10.0 release.