Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: log if metrics_endpoint but no feature flag #5279

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
5 changes: 1 addition & 4 deletions stacks-signer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ impl<S: Signer<T> + Send + 'static, T: SignerEventTrait + 'static> SpawnedSigner
);
let (res_send, res_recv) = channel();
let ev = SignerEventReceiver::new(config.network.is_mainnet());
#[cfg(feature = "monitoring_prom")]
{
crate::monitoring::start_serving_monitoring_metrics(config.clone()).ok();
}
crate::monitoring::start_serving_monitoring_metrics(config.clone()).ok();
let runloop = RunLoop::new(config.clone());
let mut signer: RunLoopSigner<S, T> = libsigner::Signer::new(runloop, ev, res_send);
let running_signer = signer.spawn(endpoint).expect("Failed to spawn signer");
Expand Down
6 changes: 3 additions & 3 deletions stacks-signer/src/monitoring/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ use ::prometheus::HistogramTimer;
#[cfg(feature = "monitoring_prom")]
use slog::slog_error;
#[cfg(not(feature = "monitoring_prom"))]
use slog::slog_warn;
use slog::slog_info;
#[cfg(feature = "monitoring_prom")]
use stacks_common::error;
#[cfg(not(feature = "monitoring_prom"))]
use stacks_common::warn;
use stacks_common::info;

use crate::config::GlobalConfig;

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