From 4be66cb3daca8cdb9d161f78c15af843dc4ffb6a Mon Sep 17 00:00:00 2001 From: giancarlo Date: Wed, 29 May 2024 13:57:36 +0700 Subject: [PATCH] Update logic for enabling monitoring instrumentation The logic to enable the monitoring instrumentation was updated in both the Sentry and Baselime packages. This change ensures that the instrumentation is only enabled when the ENV variable 'ENABLE_MONITORING_INSTRUMENTATION' is specifically set to 'true' instead of simply checking for its existence. --- packages/monitoring/baselime/src/instrumentation.ts | 2 +- packages/monitoring/sentry/src/instrumentation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/monitoring/baselime/src/instrumentation.ts b/packages/monitoring/baselime/src/instrumentation.ts index 8f9654276..dba283d09 100644 --- a/packages/monitoring/baselime/src/instrumentation.ts +++ b/packages/monitoring/baselime/src/instrumentation.ts @@ -5,7 +5,7 @@ * Please set the MONITORING_PROVIDER environment variable to 'baselime' to register Baselime instrumentation. */ export async function registerInstrumentation() { - if (!process.env.ENABLE_MONITORING_INSTRUMENTATION) { + if (process.env.ENABLE_MONITORING_INSTRUMENTATION !== 'true') { return; } diff --git a/packages/monitoring/sentry/src/instrumentation.ts b/packages/monitoring/sentry/src/instrumentation.ts index 244668b9f..6da870e9c 100644 --- a/packages/monitoring/sentry/src/instrumentation.ts +++ b/packages/monitoring/sentry/src/instrumentation.ts @@ -12,7 +12,7 @@ export async function registerInstrumentation() { // initialize the Sentry client in the server void initializeSentryServerClient(); - if (!process.env.ENABLE_MONITORING_INSTRUMENTATION) { + if (process.env.ENABLE_MONITORING_INSTRUMENTATION !== 'true') { return; }