From 4221fc1a8ed6ce7960328de125331ee90e251c20 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Wed, 20 Nov 2024 13:10:23 +0000 Subject: [PATCH] feat: configure status-go sentry --- Makefile | 2 ++ src/backend/accounts.nim | 7 ++++++- src/constants.nim | 2 ++ src/env_cli_vars.nim | 4 ++++ vendor/status-go | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b402ce743c..11ee093406 100644 --- a/Makefile +++ b/Makefile @@ -439,6 +439,8 @@ $(STATUSGO): | deps status-go-deps echo -e $(BUILD_MSG) "status-go" # FIXME: Nix shell usage breaks builds due to Glibc mismatch. $(MAKE) -C vendor/status-go statusgo-shared-library SHELL=/bin/sh \ + SENTRY_CONTEXT_NAME="status-desktop" \ + SENTRY_CONTEXT_VERSION="$(DESKTOP_VERSION)" \ $(STATUSGO_MAKE_PARAMS) $(HANDLE_OUTPUT) status-go: $(STATUSGO) diff --git a/src/backend/accounts.nim b/src/backend/accounts.nim index e5ce883a7e..a2b61e470d 100644 --- a/src/backend/accounts.nim +++ b/src/backend/accounts.nim @@ -259,7 +259,12 @@ proc createAccountFromPrivateKey*(privateKey: string): RpcResponse[JsonNode] = proc openedAccounts*(path: string): RpcResponse[JsonNode] = try: - let payload = %* {"dataDir": path, "mixpanelAppId": MIXPANEL_APP_ID, "mixpanelToken": MIXPANEL_TOKEN} + let payload = %* { + "dataDir": path, + "mixpanelAppId": MIXPANEL_APP_ID, + "mixpanelToken": MIXPANEL_TOKEN, + "sentryDSN": SENTRY_DSN_STATUS_GO, + } # Do not remove the sleep 700 # This sleep prevents a crash on intel MacOS # with errors like bad flushGen 12 in prepareForSweep; sweepgen 0 diff --git a/src/constants.nim b/src/constants.nim index ce5d21aa53..8d9f57ac49 100644 --- a/src/constants.nim +++ b/src/constants.nim @@ -64,6 +64,8 @@ let BUILD_MODE* = if defined(production): "prod" else: "test" HTTP_API_ENABLED* = desktopConfig.httpApiEnabled WS_API_ENABLED* = desktopConfig.wsApiEnabled + SENTRY_DSN_STATUS_GO* = BUILD_SENTRY_DSN_STATUS_GO + SENTRY_DSN_STATUS_GO_DESKTOP* = BUILD_SENTRY_DSN_STATUS_DESKTOP proc hasLogLevelOption*(): bool = for p in cliParams: diff --git a/src/env_cli_vars.nim b/src/env_cli_vars.nim index c1c7d32d65..0cca223d97 100644 --- a/src/env_cli_vars.nim +++ b/src/env_cli_vars.nim @@ -31,6 +31,8 @@ const BASE_NAME_STATUS_PROXY_PASSWORD = "PROXY_PASSWORD" const BASE_NAME_WALLET_CONNECT_PROJECT_ID = "WALLET_CONNECT_PROJECT_ID" const BASE_NAME_MIXPANEL_APP_ID = "MIXPANEL_APP_ID" const BASE_NAME_MIXPANEL_TOKEN = "MIXPANEL_TOKEN" +const BASE_NAME_SENTRY_DSN_STATUS_GO = "SENTRY_DSN_STATUS_GO" +const BASE_NAME_SENTRY_DSN_STATUS_DESKTOP = "SENTRY_DSN_STATUS_DESKTOP" ################################################################################ @@ -49,6 +51,8 @@ const BUILD_MIXPANEL_APP_ID = getEnv(BUILD_TIME_PREFIX & BASE_NAME_MIXPANEL_APP_ID, DEFAULT_MIXPANEL_APP_ID) DEFAULT_MIXPANEL_TOKEN = "5c73bda2d36a9f688a5ee45641fb6775" BUILD_MIXPANEL_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_MIXPANEL_TOKEN, DEFAULT_MIXPANEL_TOKEN) + BUILD_SENTRY_DSN_STATUS_GO = getEnv(BUILD_TIME_PREFIX & BASE_NAME_SENTRY_DSN_STATUS_GO, "") + BUILD_SENTRY_DSN_STATUS_DESKTOP = getEnv(BUILD_TIME_PREFIX & BASE_NAME_SENTRY_DSN_STATUS_DESKTOP, "") const BUILD_OPENSEA_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_OPENSEA_API_KEY) const BUILD_RARIBLE_MAINNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_MAINNET_API_KEY) const BUILD_RARIBLE_TESTNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_TESTNET_API_KEY) diff --git a/vendor/status-go b/vendor/status-go index 7ee45bab1c..72d55a2cd3 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit 7ee45bab1cc6ef6da24ade1826f11152153d4783 +Subproject commit 72d55a2cd36277e3d29bb55c1e59aa09ba2cd0ad