Skip to content

Commit 7636066

Browse files
committed
fix(metrics): initialize block_by_number cache metrics
1 parent bf32799 commit 7636066

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/consensus/providers-alloy/src/metrics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ impl Metrics {
114114
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_HITS, "cache", "header_by_hash", 0);
115115
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_HITS, "cache", "receipts_by_hash", 0);
116116
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_HITS, "cache", "block_info_and_tx", 0);
117+
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_HITS, "cache", "block_by_number", 0);
117118

118119
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_MISSES, "cache", "header_by_hash", 0);
119120
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_MISSES, "cache", "receipts_by_hash", 0);
@@ -124,6 +125,7 @@ impl Metrics {
124125
"block_info_and_tx",
125126
0
126127
);
128+
base_macros::set!(gauge, Self::CHAIN_PROVIDER_CACHE_MISSES, "cache", "block_by_number", 0);
127129

128130
// RPC call metrics
129131
base_macros::set!(gauge, Self::CHAIN_PROVIDER_RPC_CALLS, "method", "header_by_hash", 0);

0 commit comments

Comments
 (0)