From 1a03dad6bcd184e2fc46d36c40cdfd9415c863a7 Mon Sep 17 00:00:00 2001 From: Potuz Date: Tue, 3 Nov 2020 17:40:25 -0300 Subject: [PATCH] Include exiting and slashing as active in metrics (#7713) Co-authored-by: terence tsao Co-authored-by: Raul Jordan --- beacon-chain/blockchain/metrics.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beacon-chain/blockchain/metrics.go b/beacon-chain/blockchain/metrics.go index 2b9be8996b..dcb53facaa 100644 --- a/beacon-chain/blockchain/metrics.go +++ b/beacon-chain/blockchain/metrics.go @@ -173,6 +173,10 @@ func reportEpochMetrics(ctx context.Context, postState, headState *stateTrie.Bea activeBalance += bal activeEffectiveBalance += validator.EffectiveBalance } + activeInstances += exitingInstances + slashingInstances + activeBalance += exitingBalance + slashingBalance + activeEffectiveBalance += exitingEffectiveBalance + slashingEffectiveBalance + validatorsCount.WithLabelValues("Pending").Set(float64(pendingInstances)) validatorsCount.WithLabelValues("Active").Set(float64(activeInstances)) validatorsCount.WithLabelValues("Exiting").Set(float64(exitingInstances))