From 4055f682144e5310a8e1473be4c194d0d7efdd52 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Thu, 9 May 2024 07:43:05 +0200 Subject: [PATCH] feat: Bun v7 GlobalHandlers --- packages/bun/src/sdk.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/bun/src/sdk.ts b/packages/bun/src/sdk.ts index f8dbcb99c0df..836a958b29df 100644 --- a/packages/bun/src/sdk.ts +++ b/packages/bun/src/sdk.ts @@ -13,6 +13,8 @@ import { modulesIntegration, nativeNodeFetchintegration, nodeContextIntegration, + onUncaughtExceptionIntegration, + onUnhandledRejectionIntegration, } from '@sentry/node'; import type { Integration, Options } from '@sentry/types'; @@ -32,9 +34,9 @@ export const defaultIntegrations = [ consoleIntegration(), httpIntegration(), nativeNodeFetchintegration(), - // Global Handlers # TODO (waiting for https://github.com/oven-sh/bun/issues/5091) - // new NodeIntegrations.OnUncaughtException(), - // new NodeIntegrations.OnUnhandledRejection(), + // Global Handlers + onUncaughtExceptionIntegration(), + onUnhandledRejectionIntegration(), // Event Info contextLinesIntegration(), // new NodeIntegrations.LocalVariables(), # does't work with Bun