From 2bc18150285ce92af42e3784be9257112ee490dc Mon Sep 17 00:00:00 2001 From: tsa96 Date: Sun, 5 Jan 2025 04:02:28 +0000 Subject: [PATCH] refactor(back): remove deprecated Sentry enableTracing option --- apps/backend/src/instrumentation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/backend/src/instrumentation.ts b/apps/backend/src/instrumentation.ts index 01df45811..96123b2df 100644 --- a/apps/backend/src/instrumentation.ts +++ b/apps/backend/src/instrumentation.ts @@ -21,7 +21,7 @@ import { Environment } from './app/config'; const dsn = process.env['SENTRY_DSN']; const enableTracing = process.env['SENTRY_ENABLE_TRACING'] === 'true'; -const sampleRate = +process.env['SENTRY_TRACE_SAMPLE_RATE']; +const sampleRate = enableTracing ? +process.env['SENTRY_TRACE_SAMPLE_RATE'] : 0; const integrations: Integration[] = [nestIntegration()]; @@ -39,7 +39,6 @@ if (process.env['SENTRY_ENABLE_NODE_PROFILING'] === 'true') { const opts: NodeOptions = { dsn, environment: process.env['SENTRY_ENV'], - enableTracing, tracesSampleRate: sampleRate, profilesSampleRate: sampleRate, debug: false,