From 422663aa7929fff3816fe31a5395f706d98ce361 Mon Sep 17 00:00:00 2001 From: "anton.buksa" Date: Thu, 15 Aug 2024 09:44:14 +0200 Subject: [PATCH] fix types --- webapp/channels/src/utils/sentry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/channels/src/utils/sentry.ts b/webapp/channels/src/utils/sentry.ts index 85acf64966..ea77e6ca0a 100644 --- a/webapp/channels/src/utils/sentry.ts +++ b/webapp/channels/src/utils/sentry.ts @@ -8,8 +8,8 @@ interface Args { } // Webpack global var -declare const GIT_RELEASE: string; -declare const SENTRY_PERFORMANCE_SAMPLE_RATE: number; +declare const GIT_RELEASE: ReturnType; +declare const SENTRY_PERFORMANCE_SAMPLE_RATE: ReturnType; const isLocalhost = (host: string) => host.startsWith('localhost') || host.startsWith('infomaniak.local.') || host.startsWith('kchat.local.') || host.startsWith('local.') || host.startsWith('kchat.devd'); const isCanaryOrPreprod = GIT_RELEASE.includes('-next') || GIT_RELEASE.includes('-rc'); @@ -41,7 +41,7 @@ export default function init({SENTRY_DSN}: Args) { isCanaryOrPreprod && new Sentry.BrowserTracing(), isCanaryOrPreprod && new Sentry.Replay(), ].filter(bool), - tracesSampleRate: SENTRY_PERFORMANCE_SAMPLE_RATE, + tracesSampleRate: parseFloat(SENTRY_PERFORMANCE_SAMPLE_RATE), ignoreErrors: [ // Ignore random plugins/extensions