From eba31a7216c0bff7a7e73ca991a702822a4a77cf Mon Sep 17 00:00:00 2001 From: valere Date: Mon, 15 May 2023 11:10:22 +0200 Subject: [PATCH] Add sentry config for rust crypto update posthog url --- changelog.d/8436.misc | 1 + vector-config/src/main/java/im/vector/app/config/Config.kt | 3 ++- .../main/java/im/vector/app/core/di/ConfigurationModule.kt | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 changelog.d/8436.misc diff --git a/changelog.d/8436.misc b/changelog.d/8436.misc new file mode 100644 index 0000000000..ab174eca5b --- /dev/null +++ b/changelog.d/8436.misc @@ -0,0 +1 @@ +Updated posthog url (cosmetic, target same server) and added a new sentry env. diff --git a/vector-config/src/main/java/im/vector/app/config/Config.kt b/vector-config/src/main/java/im/vector/app/config/Config.kt index 9102e938f8..e51d09e13b 100644 --- a/vector-config/src/main/java/im/vector/app/config/Config.kt +++ b/vector-config/src/main/java/im/vector/app/config/Config.kt @@ -83,7 +83,7 @@ object Config { * Can be disabled by providing Analytics.Disabled */ val RELEASE_ANALYTICS_CONFIG = Analytics.Enabled( - postHogHost = "https://posthog.hss.element.io", + postHogHost = "https://posthog.element.io", postHogApiKey = "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO", policyLink = "https://element.io/cookie-policy", sentryDSN = "https://f6acc9cfc2024641b28c87ad95e73e66@sentry.tools.element.io/49", @@ -95,6 +95,7 @@ object Config { * Can be disabled by providing Analytics.Disabled */ val NIGHTLY_ANALYTICS_CONFIG = RELEASE_ANALYTICS_CONFIG.copy(sentryEnvironment = "NIGHTLY") + val RELEASE_R_ANALYTICS_CONFIG = RELEASE_ANALYTICS_CONFIG.copy(sentryEnvironment = "RELEASE-R") val ER_NIGHTLY_ANALYTICS_CONFIG = RELEASE_ANALYTICS_CONFIG.copy(sentryEnvironment = "element-r") val ER_DEBUG_ANALYTICS_CONFIG = DEBUG_ANALYTICS_CONFIG.copy(sentryEnvironment = "element-r") diff --git a/vector/src/main/java/im/vector/app/core/di/ConfigurationModule.kt b/vector/src/main/java/im/vector/app/core/di/ConfigurationModule.kt index ce7da7fe68..7a1f7f2292 100644 --- a/vector/src/main/java/im/vector/app/core/di/ConfigurationModule.kt +++ b/vector/src/main/java/im/vector/app/core/di/ConfigurationModule.kt @@ -48,7 +48,11 @@ object ConfigurationModule { } else { Config.NIGHTLY_ANALYTICS_CONFIG } - "release" -> Config.RELEASE_ANALYTICS_CONFIG + "release" -> if (BuildConfig.FLAVOR == "rustCrypto") { + Config.RELEASE_R_ANALYTICS_CONFIG + } else { + Config.RELEASE_ANALYTICS_CONFIG + } else -> throw IllegalStateException("Unhandled build type: ${BuildConfig.BUILD_TYPE}") } return when (config) {