From 39951e313f28de2b3729a55c94178c632429ab53 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 18 Nov 2020 13:54:15 +0700 Subject: [PATCH] fix(common): Add environment to web Sentry reports --- common/core/web/tools/sentry-manager/src/index.ts | 3 ++- resources/web-environment/build.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/core/web/tools/sentry-manager/src/index.ts b/common/core/web/tools/sentry-manager/src/index.ts index bf86a5db74..965c38dc72 100644 --- a/common/core/web/tools/sentry-manager/src/index.ts +++ b/common/core/web/tools/sentry-manager/src/index.ts @@ -149,7 +149,8 @@ namespace com.keyman { beforeSend: this.prepareEventDebugWrapper.bind(this), debug: DEBUG, dsn: 'https://cf96f32d107c4286ab2fd82af49c4d3b@sentry.keyman.com/11', // keyman-web DSN - release: com.keyman.environment.SENTRY_RELEASE + release: com.keyman.environment.SENTRY_RELEASE, + environment: com.keyman.environment.ENVIRONMENT }); } } diff --git a/resources/web-environment/build.sh b/resources/web-environment/build.sh index f8efd48053..5a01b23d2d 100755 --- a/resources/web-environment/build.sh +++ b/resources/web-environment/build.sh @@ -17,6 +17,7 @@ echo "//Autogenerated file - do not modify! namespace com.keyman.environment { export var VERSION = \"$VERSION_RELEASE\"; export var BUILD = $VERSION_PATCH; + export var ENVIRONMENT = \"$VERSION_ENVIRONMENT\"; export var SENTRY_RELEASE = \"release-$VERSION_WITH_TAG\"; } -" >> $ENVIRONMENT_TS \ No newline at end of file +" >> $ENVIRONMENT_TS