mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
71 lines
1.8 KiB
Go
71 lines
1.8 KiB
Go
|
package monitor
|
||
|
|
||
|
import (
|
||
|
"github.com/prometheus/client_golang/prometheus"
|
||
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
log = logrus.WithField("prefix", "monitor")
|
||
|
// TODO: The Prometheus gauge vectors and counters in this package deprecate the
|
||
|
// corresponding gauge vectors and counters in the validator client.
|
||
|
|
||
|
// inclusionSlotGauge used to track attestation inclusion distance
|
||
|
inclusionSlotGauge = promauto.NewGaugeVec(
|
||
|
prometheus.GaugeOpts{
|
||
|
Namespace: "monitor",
|
||
|
Name: "inclusion_slot",
|
||
|
Help: "Attestations inclusion slot",
|
||
|
},
|
||
|
[]string{
|
||
|
"validator_index",
|
||
|
},
|
||
|
)
|
||
|
// timelyHeadCounter used to track attestation timely head flags
|
||
|
timelyHeadCounter = promauto.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Namespace: "monitor",
|
||
|
Name: "timely_head",
|
||
|
Help: "Attestation timely Head flag",
|
||
|
},
|
||
|
[]string{
|
||
|
"validator_index",
|
||
|
},
|
||
|
)
|
||
|
// timelyTargetCounter used to track attestation timely head flags
|
||
|
timelyTargetCounter = promauto.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Namespace: "monitor",
|
||
|
Name: "timely_target",
|
||
|
Help: "Attestation timely Target flag",
|
||
|
},
|
||
|
[]string{
|
||
|
"validator_index",
|
||
|
},
|
||
|
)
|
||
|
// timelySourceCounter used to track attestation timely head flags
|
||
|
timelySourceCounter = promauto.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Namespace: "monitor",
|
||
|
Name: "timely_source",
|
||
|
Help: "Attestation timely Source flag",
|
||
|
},
|
||
|
[]string{
|
||
|
"validator_index",
|
||
|
},
|
||
|
)
|
||
|
|
||
|
// aggregationCounter used to track aggregations
|
||
|
aggregationCounter = promauto.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Namespace: "monitor",
|
||
|
Name: "aggregations",
|
||
|
Help: "Number of aggregation duties performed",
|
||
|
},
|
||
|
[]string{
|
||
|
"validator_index",
|
||
|
},
|
||
|
)
|
||
|
)
|