From 0f97351b56ee1ba47264663f86f973798b9d08c4 Mon Sep 17 00:00:00 2001 From: kimyu0218 Date: Thu, 16 May 2024 23:02:13 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20sentry=20=EB=B2=84=EC=A0=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/was/src/common/config/sentry.setting.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/was/src/common/config/sentry.setting.ts b/backend/was/src/common/config/sentry.setting.ts index dd05d10c..7e5e13f9 100644 --- a/backend/was/src/common/config/sentry.setting.ts +++ b/backend/was/src/common/config/sentry.setting.ts @@ -1,16 +1,14 @@ import { INestApplication } from '@nestjs/common/interfaces/nest-application.interface'; import * as Sentry from '@sentry/node'; -import { ProfilingIntegration } from '@sentry/profiling-node'; +import { nodeProfilingIntegration } from '@sentry/profiling-node'; export function setupSentry(app: INestApplication, dsn: string): void { Sentry.init({ dsn: dsn, - integrations: [new ProfilingIntegration()], + integrations: [nodeProfilingIntegration()], tracesSampleRate: 0.3, profilesSampleRate: 0.3, }); - app.use(Sentry.Handlers.errorHandler()); - app.use(Sentry.Handlers.tracingHandler()); - app.use(Sentry.Handlers.requestHandler()); + Sentry.setupExpressErrorHandler(app); }