fix: task executor metrics (#11738)

This commit is contained in:
greged93
2024-10-16 12:39:25 +02:00
committed by GitHub
parent d421931b7e
commit 248b6b5905
3 changed files with 6 additions and 6 deletions

View File

@ -18,6 +18,7 @@ use reth_db::DatabaseEnv;
use reth_ethereum_cli::chainspec::EthereumChainSpecParser;
use reth_node_builder::{NodeBuilder, WithLaunchContext};
use reth_node_ethereum::{EthExecutorProvider, EthereumNode};
use reth_node_metrics::recorder::install_prometheus_recorder;
use reth_tracing::FileWorkerGuard;
use std::{ffi::OsString, fmt, future::Future, sync::Arc};
use tracing::info;
@ -145,6 +146,10 @@ 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
let _ = install_prometheus_recorder();
let runner = CliRunner::default();
match self.command {
Commands::Node(command) => {