From dc98734e473ecf4ae8e0210b0b3cc5a5ca8da638 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 4 Nov 2024 10:17:01 +0100 Subject: [PATCH] fix: external prometheus (#91) --- rust/theoros/src/cli.rs | 3 +++ rust/theoros/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/theoros/src/cli.rs b/rust/theoros/src/cli.rs index b67f734..a591d7e 100644 --- a/rust/theoros/src/cli.rs +++ b/rust/theoros/src/cli.rs @@ -50,6 +50,9 @@ pub struct TheorosCli { value_parser = parse_evm_config )] pub evm_config: evm_config::EvmConfig, + + #[clap(env = "PROMETHEUS_EXTERNAL", long, default_value = "false")] + pub prometheus_external: bool, } /// Parse a Felt. diff --git a/rust/theoros/src/main.rs b/rust/theoros/src/main.rs index 248c483..e2ffafd 100644 --- a/rust/theoros/src/main.rs +++ b/rust/theoros/src/main.rs @@ -45,7 +45,7 @@ async fn main() -> Result<()> { ) .await?; - let metrics_service = MetricsService::new(false, config.metrics_port)?; + let metrics_service = MetricsService::new(config.prometheus_external, config.metrics_port)?; let state = AppState { starknet_rpc: Arc::new(starknet_rpc),