mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-16 06:58:20 +00:00
add slot metric (#1815)
This commit is contained in:
parent
f5aed821a6
commit
f09c66035b
@ -15,6 +15,10 @@ var (
|
|||||||
}, []string{
|
}, []string{
|
||||||
"validator",
|
"validator",
|
||||||
})
|
})
|
||||||
|
lastSlotGauge = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||||
|
Name: "state_last_slot",
|
||||||
|
Help: "Last slot number of the processed state",
|
||||||
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
func reportEpochTransitionMetrics(state *pb.BeaconState) {
|
func reportEpochTransitionMetrics(state *pb.BeaconState) {
|
||||||
@ -24,4 +28,6 @@ func reportEpochTransitionMetrics(state *pb.BeaconState) {
|
|||||||
"0x" + hex.EncodeToString(state.ValidatorRegistry[i].Pubkey), // Validator
|
"0x" + hex.EncodeToString(state.ValidatorRegistry[i].Pubkey), // Validator
|
||||||
).Set(float64(bal))
|
).Set(float64(bal))
|
||||||
}
|
}
|
||||||
|
// Slot number
|
||||||
|
lastSlotGauge.Set(float64(state.Slot))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user