Skip to content

Commit

Permalink
fix: invoke prometheus recorder on op-reth Cli::run (#11982)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Oct 22, 2024
1 parent 3174bd5 commit 28c61c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions bin/reth/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>, Ext: clap::Args + fmt::Debug> Cl
let _guard = self.init_tracing()?;
info!(target: "reth::cli", "Initialized tracing, debug log directory: {}", self.logs.log_file_directory);

// Install the prometheus recorder to be sure to record task
// executor's metrics
// Install the prometheus recorder to be sure to record all metrics
let _ = install_prometheus_recorder();

let runner = CliRunner::default();
Expand Down
4 changes: 4 additions & 0 deletions crates/optimism/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ use tracing::info;
// This allows us to manually enable node metrics features, required for proper jemalloc metric
// reporting
use reth_node_metrics as _;
use reth_node_metrics::recorder::install_prometheus_recorder;

/// The main op-reth cli interface.
///
Expand Down Expand Up @@ -135,6 +136,9 @@ where
let _guard = self.init_tracing()?;
info!(target: "reth::cli", "Initialized tracing, debug log directory: {}", self.logs.log_file_directory);

// Install the prometheus recorder to be sure to record all metrics
let _ = install_prometheus_recorder();

let runner = CliRunner::default();
match self.command {
Commands::Node(command) => {
Expand Down

0 comments on commit 28c61c1

Please sign in to comment.