Skip to content

Commit bac1b07

Browse files
authored
Merge pull request #5279 from stacks-network/feat/log-not-starting-metrics
chore: log if metrics_endpoint but no feature flag
2 parents 6e0bd5a + e5c2952 commit bac1b07

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

stacks-signer/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ impl<S: Signer<T> + Send + 'static, T: SignerEventTrait + 'static> SpawnedSigner
125125
);
126126
let (res_send, res_recv) = channel();
127127
let ev = SignerEventReceiver::new(config.network.is_mainnet());
128-
#[cfg(feature = "monitoring_prom")]
129-
{
130-
crate::monitoring::start_serving_monitoring_metrics(config.clone()).ok();
131-
}
128+
crate::monitoring::start_serving_monitoring_metrics(config.clone()).ok();
132129
let runloop = RunLoop::new(config.clone());
133130
let mut signer: RunLoopSigner<S, T> = libsigner::Signer::new(runloop, ev, res_send);
134131
let running_signer = signer.spawn(endpoint).expect("Failed to spawn signer");

stacks-signer/src/monitoring/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ use ::prometheus::HistogramTimer;
1919
#[cfg(feature = "monitoring_prom")]
2020
use slog::slog_error;
2121
#[cfg(not(feature = "monitoring_prom"))]
22-
use slog::slog_warn;
22+
use slog::slog_info;
2323
#[cfg(feature = "monitoring_prom")]
2424
use stacks_common::error;
2525
#[cfg(not(feature = "monitoring_prom"))]
26-
use stacks_common::warn;
26+
use stacks_common::info;
2727

2828
use crate::config::GlobalConfig;
2929

@@ -143,7 +143,7 @@ pub fn start_serving_monitoring_metrics(config: GlobalConfig) -> Result<(), Stri
143143
#[cfg(not(feature = "monitoring_prom"))]
144144
{
145145
if config.metrics_endpoint.is_some() {
146-
warn!("Not starting monitoring metrics server as the monitoring_prom feature is not enabled");
146+
info!("`metrics_endpoint` is configured for the signer, but the monitoring_prom feature is not enabled. Not starting monitoring metrics server.");
147147
}
148148
}
149149
Ok(())

0 commit comments

Comments
 (0)