diff --git a/src/utils/sentry.ts b/src/utils/sentry.ts index 3a9911168..80176ae30 100644 --- a/src/utils/sentry.ts +++ b/src/utils/sentry.ts @@ -49,6 +49,8 @@ function initSentry() { sentryInitialized = true; const appDetails = getAppDetails(); + //These two apps will not be set up as of now. This helps limit transacations + const avoidedApps = ['subscriptions', 'image-builder']; // dsn: key // environment: logs Prod or Prod Beta for filtering @@ -97,9 +99,10 @@ function initSentry() { return event; }, - //These two apps will not be set up as of now. This helps limit transacations - beforeSendTransaction: (event) => { - if (event?.contexts?.app?.app_name === 'subscriptions' || event.contexts?.app?.app_name === 'image-builder') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + beforeSendTransaction: (event: any) => { + const appName = event?.contexts?.app?.app_name; + if (avoidedApps.includes(appName)) { return null; } return event;