Skip to content

test(bun): Run the auto-instrumentation suites with bundled scenarios - #24612

Draft
JPeer264 wants to merge 1 commit into
jp/node-suites-bun-sdk-fixesfrom
jp/node-suites-bun-build
Draft

JPeer264 wants to merge 1 commit into
jp/node-suites-bun-sdk-fixesfrom
jp/node-suites-bun-build

Conversation

@JPeer264

@JPeer264 JPeer264 commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Under bun run the SDK cannot inject diagnostics channels into libraries (#23882), so a Bun app only gets framework, database and AI spans when it is built with @sentry/bun/plugin. That path had no integration coverage. The new node-suites-bun-build project bundles each auto-instrumentation scenario with the plugin right before it starts and runs it with @sentry/bun. Express, Fastify, Hapi, Koa, Apollo, most AI suites and the Docker database suites now run on Bun.

pg-native and the CommonJS postgresjs tests are skipped on Bun: the libpq addon needs a Node symbol that Bun does not have, and through the bun export condition require('postgres') returns the ES module namespace.

Closes #23889.

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

JS-3515

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.15 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.17 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.18 kB - -
@sentry/browser (incl. Tracing, Replay) 90.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 95.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 108.41 kB - -
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.51 kB - -
@sentry/browser (incl. Metrics & Logs) 31.18 kB - -
@sentry/react 31 kB - -
@sentry/react (incl. Tracing) 53.45 kB - -
@sentry/vue 36.74 kB - -
@sentry/vue (incl. Tracing) 53.7 kB - -
@sentry/svelte 29.26 kB - -
CDN Bundle 30.93 kB - -
CDN Bundle (incl. Tracing) 51.69 kB - -
CDN Bundle (incl. Logs, Metrics) 33.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.66 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.92 kB - -
CDN Bundle (incl. Tracing, Replay) 89.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.25 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 95.45 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.42 kB - -
CDN Bundle - uncompressed 91.4 kB - -
CDN Bundle (incl. Tracing) - uncompressed 153.77 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.97 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 159.73 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.54 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.5 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.2 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.13 kB - -
@sentry/nextjs (client) 55.77 kB - -
@sentry/sveltekit (client) 51.59 kB - -
@sentry/core/server 39.95 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 136.77 kB +0.11% +138 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.74 kB +0.22% +178 B 🔺
@sentry/node - without tracing 90.78 kB +0.23% +207 B 🔺
@sentry/node - without channel injection 115.14 kB +0.05% +51 B 🔺
@sentry/aws-serverless 99.04 kB +0.2% +195 B 🔺
@sentry/cloudflare (withSentry) - minified 206.62 kB - -
@sentry/cloudflare (withSentry) 514.02 kB - -

View base workflow run

@JPeer264
JPeer264 added this pull request to stack #24613 September 23, 2026 06:14
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from 99acd71 to 5eb22a2 Compare September 23, 2026 08:11
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from 48d16a8 to 51be7dc Compare September 23, 2026 09:49
@JPeer264
JPeer264 removed this pull request from stack #24613 September 23, 2026 09:51
@JPeer264
JPeer264 changed the base branch from jp/node-suites-deno to jp/node-suites-bun-sdk-fixes September 23, 2026 09:51
@JPeer264
JPeer264 added this pull request to stack #24633 September 23, 2026 09:51
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from 9fc4460 to 131b223 Compare September 23, 2026 10:02
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from 131b223 to 6c3bef1 Compare September 23, 2026 10:04
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from 686046a to b0517c0 Compare September 23, 2026 12:24
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from f58de0f to b8c9dc6 Compare September 23, 2026 13:31
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from b8c9dc6 to f25eee7 Compare September 23, 2026 16:19
@JPeer264
JPeer264 removed this pull request from stack #24633 September 23, 2026 16:19
@JPeer264
JPeer264 added this pull request to stack #24670 September 23, 2026 16:19
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from f25eee7 to 4739836 Compare September 23, 2026 16:40
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from 71f4ecd to c7d69ba Compare September 23, 2026 16:59
@JPeer264
JPeer264 removed this pull request from stack #24670 September 23, 2026 17:26
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from c7d69ba to 1a809bc Compare September 23, 2026 17:27
@JPeer264
JPeer264 added this pull request to stack #24671 September 23, 2026 17:31
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from 1a809bc to 134861e Compare September 24, 2026 09:13
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from 134861e to f0036b9 Compare September 24, 2026 09:24
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 2 times, most recently from 8baec53 to c37936a Compare September 24, 2026 14:19
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from c37936a to 51538c3 Compare September 25, 2026 10:53
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 3 times, most recently from dbd8717 to b6e2d06 Compare September 25, 2026 15:49
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch 3 times, most recently from b2d85de to bab2eac Compare September 27, 2026 14:03
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from bab2eac to f7bb4f9 Compare September 27, 2026 14:57
JPeer264 added a commit that referenced this pull request Sep 27, 2026
Bun now runs every Node suite except an explicit exclude list, grouped
by cause, so a new Node test runs on Bun by default and a gap shows up
as a failing test rather than as missing coverage. Excluded files do not
run, which keeps the job fast even though most exclusions would
otherwise wait for a timeout.

The exclude groups document what `@sentry/node` currently cannot do on
Bun: no `http.server` span (Bun does not publish
`http.server.request.start`), no `fetch` spans (Bun's `fetch` does not
use undici), no outgoing `node:http` instrumentation on Bun 1.3.14
(#23881), and no auto-instrumentation under `bun run` (#23882). The list
is based on Bun 1.3.14, the version CI pins; several suites already pass
on newer Bun.

The suites that assert the SDK name use `EXPECTED_SDK_NAME`, so they
also pass in the `@sentry/bun` project.

FWIW in a later PR more tests will be enabled as Bun will then run
`Bun.build` before - see #24612

Part of #23889.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: isaacs <i@izs.me>
Under `bun run` the SDK cannot inject the diagnostics channels into
libraries (JS-3508), so Bun apps must be built with `@sentry/bun/plugin`
to get framework, database and AI spans. The new `node-suites-bun-build`
project tests that path: the runner builds each scenario with the plugin
right before it starts (`RUNTIME_BUILD_SCRIPT`), and runs the bundle
with `@sentry/bun`.

The Docker suites run as well, so the Bun CI job gets the disk space
step of the Node and Deno jobs. `pg-native` and the CommonJS
`postgresjs` tests are skipped on Bun: the `libpq` addon needs a Node
symbol that Bun does not have, and through the `bun` export condition
`require('postgres')` returns the ES module namespace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/node-suites-bun-build branch from f7bb4f9 to f5caf00 Compare September 27, 2026 15:54

This branch has not been deployed

No deployments
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.

bun: test coverage is thin

1 participant