diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 0239975d03..7834564d07 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -15,7 +15,7 @@ path = "src/main.rs" [features] default = ["metrics"] -local = ["ant-bootstrap/local", "autonomi/local"] +local = ["ant-bootstrap/local", "autonomi/local", "ant-logging/process-metrics"] metrics = ["ant-logging/process-metrics"] nightly = [] diff --git a/ant-cli/src/main.rs b/ant-cli/src/main.rs index 279a354e5d..971c38fd6a 100644 --- a/ant-cli/src/main.rs +++ b/ant-cli/src/main.rs @@ -24,7 +24,7 @@ pub use access::user_data; use clap::Parser; use color_eyre::Result; -#[cfg(feature = "metrics")] +#[cfg(feature = "local")] use ant_logging::metrics::init_metrics; use ant_logging::{LogBuilder, LogFormat, ReloadHandle, WorkerGuard}; use ant_protocol::version; @@ -73,7 +73,7 @@ async fn main() -> Result<()> { } let _log_guards = init_logging_and_metrics(&opt)?; - #[cfg(feature = "metrics")] + #[cfg(feature = "local")] tokio::spawn(init_metrics(std::process::id())); info!("\"{}\"", std::env::args().collect::>().join(" ")); diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index 053390041e..a7b9b817b7 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -17,9 +17,9 @@ path = "src/bin/antnode/main.rs" default = ["metrics", "upnp", "open-metrics", "encrypt-records"] encrypt-records = ["ant-networking/encrypt-records"] extension-module = ["pyo3/extension-module"] -local = ["ant-networking/local", "ant-evm/local", "ant-bootstrap/local"] +local = ["ant-networking/local", "ant-evm/local", "ant-bootstrap/local", "ant-logging/process-metrics"] loud = ["ant-networking/loud"] # loud mode: print important messages to console -metrics = ["ant-logging/process-metrics"] +metrics = [] nightly = [] open-metrics = ["ant-networking/open-metrics", "prometheus-client"] otlp = ["ant-logging/otlp"] diff --git a/ant-node/src/bin/antnode/main.rs b/ant-node/src/bin/antnode/main.rs index db40d00101..3397d81461 100644 --- a/ant-node/src/bin/antnode/main.rs +++ b/ant-node/src/bin/antnode/main.rs @@ -15,7 +15,7 @@ mod subcommands; use crate::subcommands::EvmNetworkCommand; use ant_bootstrap::{BootstrapCacheConfig, BootstrapCacheStore, PeersArgs}; use ant_evm::{get_evm_network_from_env, EvmNetwork, RewardsAddress}; -#[cfg(feature = "metrics")] +#[cfg(feature = "local")] use ant_logging::metrics::init_metrics; use ant_logging::{Level, LogFormat, LogOutputDest, ReloadHandle}; use ant_node::{Marker, NodeBuilder, NodeEvent, NodeEventsReceiver}; @@ -306,7 +306,7 @@ fn main() -> Result<()> { // Create a tokio runtime per `run_node` attempt, this ensures // any spawned tasks are closed before we would attempt to run // another process with these args. - #[cfg(feature = "metrics")] + #[cfg(feature = "local")] rt.spawn(init_metrics(std::process::id())); let initial_peres = rt.block_on(opt.peers.get_addrs(None, Some(100)))?; debug!("Node's owner set to: {:?}", opt.owner);