mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Add metric for re-org distance (#3566)
## Issue Addressed NA ## Proposed Changes Add a metric to track the re-org distance. ## Additional Info NA
This commit is contained in:
@@ -1189,6 +1189,10 @@ fn detect_reorg<E: EthSpec>(
|
|||||||
|
|
||||||
metrics::inc_counter(&metrics::FORK_CHOICE_REORG_COUNT);
|
metrics::inc_counter(&metrics::FORK_CHOICE_REORG_COUNT);
|
||||||
metrics::inc_counter(&metrics::FORK_CHOICE_REORG_COUNT_INTEROP);
|
metrics::inc_counter(&metrics::FORK_CHOICE_REORG_COUNT_INTEROP);
|
||||||
|
metrics::set_gauge(
|
||||||
|
&metrics::FORK_CHOICE_REORG_DISTANCE,
|
||||||
|
reorg_distance.as_u64() as i64,
|
||||||
|
);
|
||||||
warn!(
|
warn!(
|
||||||
log,
|
log,
|
||||||
"Beacon chain re-org";
|
"Beacon chain re-org";
|
||||||
|
|||||||
@@ -305,6 +305,10 @@ lazy_static! {
|
|||||||
"beacon_fork_choice_reorg_total",
|
"beacon_fork_choice_reorg_total",
|
||||||
"Count of occasions fork choice has switched to a different chain"
|
"Count of occasions fork choice has switched to a different chain"
|
||||||
);
|
);
|
||||||
|
pub static ref FORK_CHOICE_REORG_DISTANCE: Result<IntGauge> = try_create_int_gauge(
|
||||||
|
"beacon_fork_choice_reorg_distance",
|
||||||
|
"The distance of each re-org of the fork choice algorithm"
|
||||||
|
);
|
||||||
pub static ref FORK_CHOICE_REORG_COUNT_INTEROP: Result<IntCounter> = try_create_int_counter(
|
pub static ref FORK_CHOICE_REORG_COUNT_INTEROP: Result<IntCounter> = try_create_int_counter(
|
||||||
"beacon_reorgs_total",
|
"beacon_reorgs_total",
|
||||||
"Count of occasions fork choice has switched to a different chain"
|
"Count of occasions fork choice has switched to a different chain"
|
||||||
|
|||||||
Reference in New Issue
Block a user