Skip to content

Commit

Permalink
fix: adjust cli metrics feature flagging
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaslong committed Jan 21, 2025
1 parent de95a3c commit c2795e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ pub struct Start {
pub logfile: PathBuf,

/// Enables the metrics exporter
#[cfg(feature = "metrics")]
#[clap(default_value = "false", long = "metrics")]
pub metrics: bool,
/// Specify the IP address and port for the metrics exporter
#[cfg(feature = "metrics")]
#[clap(long = "metrics-ip")]
pub metrics_ip: Option<SocketAddr>,

Expand Down Expand Up @@ -587,6 +589,7 @@ impl Start {
crate::helpers::check_validator_machine(node_type);

// Initialize the metrics.
#[cfg(feature = "metrics")]
if self.metrics {
metrics::initialize_metrics(self.metrics_ip);
}
Expand Down

0 comments on commit c2795e1

Please sign in to comment.