@@ -75,7 +75,7 @@ const NO_OUTGOING_HTTP_INSTRUMENTATION = [
7575// `bun run` cannot inject the diagnostics channels into libraries, so framework, database and AI
7676// instrumentation creates no spans. Apps must be built with `@sentry/bun/plugin`.
7777// See https://github.com/getsentry/sentry-javascript/issues/23882
78- const NO_AUTO_INSTRUMENTATION = [
78+ export const NO_AUTO_INSTRUMENTATION = [
7979 'suites/express/**' ,
8080 'suites/fs-instrumentation/test.ts' ,
8181 'suites/hono-sdk/test.ts' ,
@@ -216,3 +216,56 @@ export const SENTRY_BUN_EXCLUDE = [
216216 ...NO_NATIVE_NODE_FETCH_INTEGRATION ,
217217 ...FETCH_INTEGRATION_DIFFERS ,
218218] ;
219+
220+ // The build project (`node-suites-bun-build`) runs the suites of `NO_AUTO_INSTRUMENTATION` with the
221+ // scenarios bundled by `@sentry/bun/plugin`. These do not run there.
222+
223+ // On Bun the channel integrations subscribe at `init()` by design, and this suite checks that
224+ // they wait until their module loads.
225+ const BUN_BUILD_EAGER_SUBSCRIPTION = [ 'suites/tracing/orchestrion-lazy-registration/test.ts' ] ;
226+
227+ // The first `init()` has no DSN, so `bunHttpServerIntegration` is not set up, and the suite then
228+ // adds only `httpIntegration`. On Bun that does not isolate requests, because Bun does not publish
229+ // `http.server.request.start`.
230+ const BUN_BUILD_NO_HTTP_SERVER_INTEGRATION = [ 'suites/express/multiple-init/test.ts' ] ;
231+
232+ // Some or all tests fail with the bundled scenarios, cause not investigated yet. In
233+ // `express/tracing` only the request data tests fail: they set `httpIntegration` options, and with
234+ // `@sentry/bun` the request body comes from `bunHttpServerIntegration`.
235+ const BUN_BUILD_NOT_TRIAGED = [
236+ 'suites/express/sentry-trace/test.ts' ,
237+ 'suites/express/tracing/test.ts' ,
238+ 'suites/express/with-http/**' ,
239+ 'suites/hono-sdk/test.ts' ,
240+ 'suites/pino/test.ts' ,
241+ 'suites/tracing/google-genai-v2/test.ts' ,
242+ 'suites/tracing/google-genai/test.ts' ,
243+ 'suites/tracing/langchain/v1/test.ts' ,
244+ 'suites/tracing/mastra/test.ts' ,
245+ 'suites/tracing/mcp-handler-exact-once/test.ts' ,
246+ 'suites/tracing/mcp-server-streamed/test.ts' ,
247+ 'suites/tracing/mongodb-v4/test.ts' ,
248+ 'suites/tracing/mongodb-v5/test.ts' ,
249+ 'suites/tracing/mongodb-v6/test.ts' ,
250+ 'suites/tracing/mongodb-v7/test.ts' ,
251+ 'suites/tracing/mongodb/test.ts' ,
252+ 'suites/tracing/mongoose-tracing-channel/test.ts' ,
253+ 'suites/tracing/mongoose-v5/test.ts' ,
254+ 'suites/tracing/mongoose-v7/test.ts' ,
255+ 'suites/tracing/mongoose-v8/test.ts' ,
256+ 'suites/tracing/mongoose-v9/test.ts' ,
257+ 'suites/tracing/mongoose/test.ts' ,
258+ 'suites/tracing/mysql/test.ts' ,
259+ 'suites/tracing/openai/test.ts' ,
260+ 'suites/tracing/prisma-orm-v8/test.ts' ,
261+ 'suites/tracing/together-ai/test.ts' ,
262+ 'suites/tracing/vercelai/test.ts' ,
263+ 'suites/tracing/vercelai/v6_v7/test.ts' ,
264+ ] ;
265+
266+ export const BUN_BUILD_EXCLUDE = [
267+ '**/node_modules/**' ,
268+ ...BUN_BUILD_EAGER_SUBSCRIPTION ,
269+ ...BUN_BUILD_NO_HTTP_SERVER_INTEGRATION ,
270+ ...BUN_BUILD_NOT_TRIAGED ,
271+ ] ;
0 commit comments