From 115c6e8357eda157cbef1d22dc9aa82b7bdd26a4 Mon Sep 17 00:00:00 2001 From: James Salter Date: Wed, 20 Oct 2021 17:20:50 +0100 Subject: [PATCH] Sentry uses RELEASE from webpack to correspond with sourcemap uploader (#6996) use RELEASE from webpack to correspond with sourcemap uploader --- src/sentry.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/sentry.ts b/src/sentry.ts index 2a68442e5d..559737e265 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -15,7 +15,6 @@ limitations under the License. */ import * as Sentry from "@sentry/browser"; -import PlatformPeg from "./PlatformPeg"; import SdkConfig from "./SdkConfig"; import { MatrixClientPeg } from "./MatrixClientPeg"; import SettingsStore from "./settings/SettingsStore"; @@ -200,15 +199,9 @@ interface ISentryConfig { export async function initSentry(sentryConfig: ISentryConfig): Promise { if (!sentryConfig) return; - const platform = PlatformPeg.get(); - let appVersion = "unknown"; - try { - appVersion = await platform.getAppVersion(); - } catch (e) {} - Sentry.init({ dsn: sentryConfig.dsn, - release: `${platform.getHumanReadableName()}@${appVersion}`, + release: process.env.RELEASE, environment: sentryConfig.environment, defaultIntegrations: false, autoSessionTracking: false,