Title: `sentryBunPlugin` should inject debug IDs and upload source maps, like the esbuild plugin · Issue #25618 · getsentry/sentry-javascript · GitHub
Open Graph Title: `sentryBunPlugin` should inject debug IDs and upload source maps, like the esbuild plugin · Issue #25618 · getsentry/sentry-javascript
X Title: `sentryBunPlugin` should inject debug IDs and upload source maps, like the esbuild plugin · Issue #25618 · getsentry/sentry-javascript
Description: Problem Statement 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/serve...
Open Graph Description: Problem Statement 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 ...
X Description: Problem Statement 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 ...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/25618
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`sentryBunPlugin` should inject debug IDs and upload source maps, like the esbuild plugin","articleBody":"### Problem Statement\n\nThe 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`.\n\nThe 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.\n\n### Solution Brainstorm\n\nLet `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.\n\n### Additional Context\n\nMinimal build:\n\n```ts\nimport { sentryBunPlugin } from \"@sentry/bun/plugin\";\n\nawait Bun.build({\n entrypoints: [\"./src/index.ts\"],\n outdir: \"./dist\",\n target: \"bun\",\n sourcemap: \"external\",\n plugins: [sentryBunPlugin()],\n});\n```\n\nRelated: #19707 (Improve Bun Support), getsentry/toolkit#1513 (CLI side of Bun debug IDs, fixed in getsentry/toolkit#1515).\n\n### Priority\n\n\u003csub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>\n","author":{"url":"https://github.com/Itz-Agasta","@type":"Person","name":"Itz-Agasta"},"datePublished":"2026-10-21T13:20:37Z","url":"https://github.com/getsentry/sentry-javascript/issues/25618"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0f7cb9d1-5294-ba56-13dd-3fbfb03e16b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA4A:297F6F:20626:2B45A:6B042A0C |
| html-safe-nonce | da84e2cadcb21859c80a0fcc4cb85c0afba430f75857b18a5fc473a5bfb0cb2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTRBOjI5N0Y2RjoyMDYyNjoyQjQ1QTo2QjA0MkEwQyIsInZpc2l0b3JfaWQiOiI2ODkwNTA1MzQwMDIzMjIwNzQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 50ca5271bd785ffcb43d368657976dd8f495ec3e8a57dd898ce69c5243c4bec9 |
| hovercard-subject-tag | issue:5961328033 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/25618/issue_layout |
| twitter:image | https://opengraph.githubassets.com/84dc046d303441029be0475aad7c7c70d23616b151548707f405ac5616b6bb17/getsentry/sentry-javascript/issues/25618 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/84dc046d303441029be0475aad7c7c70d23616b151548707f405ac5616b6bb17/getsentry/sentry-javascript/issues/25618 |
| og:image:alt | Problem Statement 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Itz-Agasta |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width