Skip to content

Commit

Permalink
add waku metric parameters to initializeapp request
Browse files Browse the repository at this point in the history
  • Loading branch information
adklempner committed Jan 22, 2025
1 parent 82d1c7f commit 64f08b2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/backend/accounts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ proc openedAccounts*(path: string): RpcResponse[JsonNode] =
"logDir": "", # Empty value defaults to `dataDir`
"logLevel": status_const.getStatusGoLogLevel(),
"apiLoggingEnabled": status_const.API_LOGGING,
"wakuMetricsEnabled": status_const.WAKU_METRICS_ENABLED,
"wakuMetricsPort": status_const.WAKU_METRICS_PORT
}
# Do not remove the sleep 700
# This sleep prevents a crash on intel MacOS
Expand Down
2 changes: 2 additions & 0 deletions src/constants.nim
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ let
SENTRY_DSN_STATUS_GO* = BUILD_SENTRY_DSN_STATUS_GO
SENTRY_DSN_STATUS_GO_DESKTOP* = BUILD_SENTRY_DSN_STATUS_DESKTOP
API_LOGGING* = desktopConfig.apiLogging
WAKU_METRICS_ENABLED* = desktopConfig.wakuMetricsEnabled
WAKU_METRICS_PORT* = desktopConfig.wakuMetricsPort

proc hasLogLevelOption*(): bool =
for p in cliParams:
Expand Down
10 changes: 10 additions & 0 deletions src/env_cli_vars.nim
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ type StatusDesktopConfig = object
desc: "Enables status-go API logging"
name: $BASE_NAME_API_LOGGING
abbr: "api-logging" .}: bool
wakuMetricsEnabled* {.
defaultValue: false
desc: "Enables waku metrics and starts prometheus"
name: "WAKU_METRICS"
abbr: "waku-metrics" .}: bool
wakuMetricsPort* {.
defaultValue: 9305
desc: "Sets port for prometheus metrics"
name: "WAKU_METRICS_PORT"
abbr: "waku-metrics-port" .}: int

# On macOS the first time when a user gets the "App downloaded from the
# internet" warning, and clicks the Open button, the OS passes a unique process
Expand Down
2 changes: 1 addition & 1 deletion vendor/status-go
Submodule status-go updated 283 files

0 comments on commit 64f08b2

Please sign in to comment.