Skip to content

feat(bun): Add orchestrion bun build plugin#21410

Open
isaacs wants to merge 1 commit into
experiment/orchestrionjs-auto-instrumentationfrom
isaacs/bun-orchestrion
Open

feat(bun): Add orchestrion bun build plugin#21410
isaacs wants to merge 1 commit into
experiment/orchestrionjs-auto-instrumentationfrom
isaacs/bun-orchestrion

Conversation

@isaacs

@isaacs isaacs commented Jun 9, 2026

Copy link
Copy Markdown
Member

Use the orchestrion plugin defined in server-utils, and create a plugin that Bun can use in bun build mode.

Note: this does not provide a plugin for use with bun run, because that feature is blocked by oven-sh/bun#31770

When that issue resolves, we can look into providing this for the bun runtime, likely with a version guard to avoid the footgun of removing CommonJS exports in some cases.

@isaacs isaacs requested a review from a team as a code owner June 9, 2026 19:23
@isaacs isaacs requested review from JPeer264 and mydea and removed request for a team June 9, 2026 19:24
@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch from 48fa3e3 to 0157d09 Compare June 9, 2026 19:27
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from 362c870 to 39be3da Compare June 9, 2026 19:28
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.4 kB - -
@sentry/browser - with treeshaking flags 25.84 kB - -
@sentry/browser (incl. Tracing) 45.7 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.94 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.5 kB - -
@sentry/browser (incl. Tracing, Replay) 84.92 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.53 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.61 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.3 kB - -
@sentry/browser (incl. Feedback) 44.56 kB - -
@sentry/browser (incl. sendFeedback) 32.2 kB - -
@sentry/browser (incl. FeedbackAsync) 37.31 kB - -
@sentry/browser (incl. Metrics) 28.47 kB - -
@sentry/browser (incl. Logs) 28.71 kB - -
@sentry/browser (incl. Metrics & Logs) 29.4 kB - -
@sentry/react 29.2 kB - -
@sentry/react (incl. Tracing) 48 kB - -
@sentry/vue 32.42 kB - -
@sentry/vue (incl. Tracing) 47.59 kB - -
@sentry/svelte 27.42 kB - -
CDN Bundle 29.79 kB - -
CDN Bundle (incl. Tracing) 48.2 kB - -
CDN Bundle (incl. Logs, Metrics) 31.33 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.49 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.62 kB - -
CDN Bundle (incl. Tracing, Replay) 85.52 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.37 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.62 kB - -
CDN Bundle - uncompressed 88.59 kB - -
CDN Bundle (incl. Tracing) - uncompressed 145.8 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 93.29 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 149.77 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.12 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.67 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.63 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.37 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.31 kB - -
@sentry/nextjs (client) 50.45 kB - -
@sentry/sveltekit (client) 46.12 kB - -
@sentry/core/server 76.08 kB - -
@sentry/core/browser 63.22 kB - -
@sentry/node-core 61.72 kB - -
@sentry/node 129.06 kB +0.17% +218 B 🔺
@sentry/node - without tracing 74.18 kB +0.11% +77 B 🔺
@sentry/aws-serverless 86.47 kB +0.14% +118 B 🔺
@sentry/cloudflare (withSentry) - minified 174.19 kB - -
@sentry/cloudflare (withSentry) 435.41 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.01 kB added added
@sentry/node/light 50.77 kB added added

View base workflow run

@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch from 0157d09 to 25bfdaa Compare June 10, 2026 19:33
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from 39be3da to b34aa87 Compare June 10, 2026 19:34
@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch from 25bfdaa to 7a8b730 Compare June 10, 2026 19:37
Comment thread packages/bun/package.json Outdated
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from b34aa87 to 653fc0e Compare June 10, 2026 20:06
@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch from 7a8b730 to 7b69e3b Compare June 10, 2026 20:07
@github-actions

Copy link
Copy Markdown
Contributor

👋 @mydea, @JPeer264 — Please review this PR when you get a chance!

@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch 3 times, most recently from c26138a to a16cf66 Compare June 15, 2026 18:46
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from 653fc0e to 8743326 Compare June 15, 2026 18:48
Comment thread packages/bun/src/plugin.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b5a794a. Configure here.

Comment thread packages/bun/src/plugin.ts Outdated
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from b5a794a to ac38662 Compare June 15, 2026 19:00
@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch from a16cf66 to 5c34ba0 Compare June 15, 2026 19:24
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from ac38662 to 0cfd982 Compare June 15, 2026 19:46
@isaacs isaacs force-pushed the experiment/orchestrionjs-auto-instrumentation branch from 5c34ba0 to c433056 Compare June 15, 2026 22:44
Use the orchestrion plugin defined in server-utils, and create a plugin
that Bun can use in `bun build` mode.

Note: this does *not* provide a plugin for use with `bun run`, because
that feature is blocked by oven-sh/bun#31770

When that issue resolves, we can look into providing this for the bun
runtime, likely with a version guard to avoid the footgun of removing
CommonJS exports in some cases.
@isaacs isaacs force-pushed the isaacs/bun-orchestrion branch from 0cfd982 to ccbd1b2 Compare June 15, 2026 22:45
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.

1 participant