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