Skip to content

Commit

Permalink
Turn of node metrics by default
Browse files Browse the repository at this point in the history
It is strange we need to leave metrics on in the integration tests. This
is mostly because clippy is often run with `--all-features` which means
metrics would be on in the node, and then required in the integration
configuration.
  • Loading branch information
brianp committed Jan 11, 2024
1 parent c7d2d88 commit 50bd771
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion applications/minotari_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions applications/minotari_node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit 50bd771

Please sign in to comment.