From 9ea1a34dd73b5ca3eaa1c59ca0389c60a23ba0da Mon Sep 17 00:00:00 2001 From: Vitaly Drogan Date: Tue, 12 Nov 2024 12:48:21 +0100 Subject: [PATCH] metric block_sim_errors always output zero --- crates/rbuilder/src/telemetry/metrics.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/rbuilder/src/telemetry/metrics.rs b/crates/rbuilder/src/telemetry/metrics.rs index c01741e3..5318c0fc 100644 --- a/crates/rbuilder/src/telemetry/metrics.rs +++ b/crates/rbuilder/src/telemetry/metrics.rs @@ -109,10 +109,7 @@ register_metrics! { &["relay", "kind"] ) .unwrap(); - pub static BLOCK_SIM_ERRORS: IntCounterVec = IntCounterVec::new( - Opts::new("block_sim_errors", "counter of block simulation errors"), - &[] - ) + pub static BLOCK_SIM_ERRORS: IntCounter = IntCounter::new("block_sim_errors", "counter of block simulation errors") .unwrap(); pub static SIMULATED_OK_ORDERS: IntCounter = IntCounter::new("simulated_ok_orders", "Simulated succeeded orders").unwrap(); @@ -246,7 +243,7 @@ pub fn inc_too_many_req_relay_errors(relay: &MevBoostRelayID) { } pub fn inc_failed_block_simulations() { - BLOCK_SIM_ERRORS.with_label_values(&[]).inc() + BLOCK_SIM_ERRORS.inc() } pub fn set_current_block(block: u64) {