diff --git a/applications/minotari_node/Cargo.toml b/applications/minotari_node/Cargo.toml index 9d89591d21..e53215a03f 100644 --- a/applications/minotari_node/Cargo.toml +++ b/applications/minotari_node/Cargo.toml @@ -52,7 +52,7 @@ tonic = { version = "0.6.2", features = ["tls", "tls-roots" ] } tari_metrics = { path = "../../infrastructure/metrics", optional = true, features = ["server"] } [features] -default = ["metrics", "libtor"] +default = ["libtor"] metrics = ["tari_metrics", "tari_comms/metrics"] safe = [] libtor = ["tari_libtor"] diff --git a/applications/minotari_node/src/commands/command/get_network_stats.rs b/applications/minotari_node/src/commands/command/get_network_stats.rs index 73432c9378..19c86a52e4 100644 --- a/applications/minotari_node/src/commands/command/get_network_stats.rs +++ b/applications/minotari_node/src/commands/command/get_network_stats.rs @@ -25,6 +25,7 @@ use async_trait::async_trait; use clap::Parser; use super::{CommandContext, HandleCommand}; +#[cfg(feature = "metrics")] use crate::table::Table; /// Displays network stats diff --git a/applications/minotari_node/src/lib.rs b/applications/minotari_node/src/lib.rs index 780f97ad19..7e4cc087d2 100644 --- a/applications/minotari_node/src/lib.rs +++ b/applications/minotari_node/src/lib.rs @@ -55,10 +55,9 @@ use tokio::task; use tonic::transport::{Identity, Server, ServerTlsConfig}; use crate::cli::Cli; -pub use crate::{ - config::{ApplicationConfig, BaseNodeConfig, DatabaseType}, - metrics::MetricsConfig, -}; +pub use crate::config::{ApplicationConfig, BaseNodeConfig, DatabaseType}; +#[cfg(feature = "metrics")] +pub use crate::metrics::MetricsConfig; const LOG_TARGET: &str = "minotari::base_node::app"; diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index 792a942a1c..64e1411bdf 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] minotari_app_grpc = { path = "../applications/minotari_app_grpc" } minotari_app_utilities = { path = "../applications/minotari_app_utilities" } -minotari_node = { path = "../applications/minotari_node" } +minotari_node = { path = "../applications/minotari_node", features = ["metrics"] } minotari_node_grpc_client = { path = "../clients/rust/base_node_grpc_client" } tari_chat_client = { path = "../base_layer/contacts/src/chat_client" } minotari_chat_ffi = { path = "../base_layer/chat_ffi" }