fix: invoke prometheus recorder on op-reth Cli::run (#11982)

This commit is contained in:
Matthias Seitz
2024-10-22 21:46:00 +02:00
committed by GitHub
parent 3174bd5c91
commit 28c61c15b4
2 changed files with 5 additions and 2 deletions

View File

@ -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.
///
@ -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) => {