From 10661e5aa2b6b1b22ddb38920d06053e51927f36 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 7 Aug 2025 14:33:42 +0200 Subject: [PATCH] feat(bun): Export `skipOpenTelemetrySetup` option --- packages/bun/src/types.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/bun/src/types.ts b/packages/bun/src/types.ts index 45b15f80e517..755eb3e48a0a 100644 --- a/packages/bun/src/types.ts +++ b/packages/bun/src/types.ts @@ -23,6 +23,18 @@ export interface BaseBunOptions { /** Sets an optional server name (device name) */ serverName?: string; + /** + * If this is set to true, the SDK will not set up OpenTelemetry automatically. + * In this case, you _have_ to ensure to set it up correctly yourself, including: + * * The `SentrySpanProcessor` + * * The `SentryPropagator` + * * The `SentryContextManager` + * * The `SentrySampler` + * + * If you are registering your own OpenTelemetry Loader Hooks (or `import-in-the-middle` hooks), it is also recommended to set the `registerEsmLoaderHooks` option to false. + */ + skipOpenTelemetrySetup?: boolean; + /** Callback that is executed when a fatal global error occurs. */ onFatalError?(this: void, error: Error): void; }