prysm-pulse/beacon-chain/operations/slashings/metrics.go
Raul Jordan 8d3fc1ad3e
Add in Slasher Metrics (#5060)
* added in slasher metrics
* Merge branch 'master' into slasher-metrics
* add in prom bolt metrics for slasher
* Merge branch 'slasher-metrics' of github.com:prysmaticlabs/prysm into slasher-metrics
* imports
* include all metrics
* no dup bolt collector
* Update slasher/detection/attestations/spanner.go

Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
* naming best practices for prom, thx Terence
* Merge branch 'slasher-metrics' of github.com:prysmaticlabs/prysm into slasher-metrics
2020-03-10 19:41:55 +00:00

46 lines
1.3 KiB
Go

package slashings
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
numPendingAttesterSlashings = promauto.NewGauge(
prometheus.GaugeOpts{
Name: "num_pending_attester_slashings",
Help: "Number of pending attester slashings in the pool",
},
)
numAttesterSlashingsIncluded = promauto.NewCounter(
prometheus.CounterOpts{
Name: "attester_slashings_included_total",
Help: "Number of attester slashings included in blocks",
},
)
attesterSlashingReattempts = promauto.NewCounter(
prometheus.CounterOpts{
Name: "attester_slashing_reattempts_total",
Help: "Times an attester slashing for an already slashed validator is received",
},
)
numPendingProposerSlashings = promauto.NewGauge(
prometheus.GaugeOpts{
Name: "num_pending_proposer_slashings",
Help: "Number of pending proposer slashings in the pool",
},
)
numProposerSlashingsIncluded = promauto.NewCounter(
prometheus.CounterOpts{
Name: "proposer_slashings_included_total",
Help: "Number of proposer slashings included in blocks",
},
)
proposerSlashingReattempts = promauto.NewCounter(
prometheus.CounterOpts{
Name: "proposer_slashing_reattempts_total",
Help: "Times a proposer slashing for an already slashed validator is received",
},
)
)