2019-08-16 17:13:04 +00:00
|
|
|
package sync
|
|
|
|
|
2019-08-28 15:14:22 +00:00
|
|
|
import (
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
messageReceivedCounter = promauto.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
2019-09-29 18:48:55 +00:00
|
|
|
Name: "p2p_message_received_total",
|
2019-08-28 15:14:22 +00:00
|
|
|
Help: "Count of messages received.",
|
|
|
|
},
|
|
|
|
[]string{"topic"},
|
|
|
|
)
|
2019-09-30 05:23:19 +00:00
|
|
|
messageFailedValidationCounter = promauto.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "p2p_message_failed_validation_total",
|
|
|
|
Help: "Count of messages that failed validation.",
|
|
|
|
},
|
|
|
|
[]string{"topic"},
|
|
|
|
)
|
|
|
|
messageFailedProcessingCounter = promauto.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "p2p_message_failed_processing_total",
|
|
|
|
Help: "Count of messages that passed validation but failed processing.",
|
|
|
|
},
|
|
|
|
[]string{"topic"},
|
|
|
|
)
|
2020-01-02 08:09:28 +00:00
|
|
|
numberOfTimesResyncedCounter = promauto.NewCounter(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "number_of_times_resynced",
|
|
|
|
Help: "Count the number of times a node resyncs.",
|
|
|
|
},
|
|
|
|
)
|
2020-02-02 01:42:29 +00:00
|
|
|
numberOfBlocksRecoveredFromAtt = promauto.NewCounter(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "beacon_blocks_recovered_from_attestation_total",
|
|
|
|
Help: "Count the number of times a missing block recovered from attestation vote.",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
numberOfBlocksNotRecoveredFromAtt = promauto.NewCounter(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "beacon_blocks_not_recovered_from_attestation_total",
|
|
|
|
Help: "Count the number of times a missing block not recovered and pruned from attestation vote.",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
numberOfAttsRecovered = promauto.NewCounter(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "beacon_attestations_recovered_total",
|
|
|
|
Help: "Count the number of times attestation recovered because of missing block",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
numberOfAttsNotRecovered = promauto.NewCounter(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Name: "beacon_attestations_not_recovered_total",
|
|
|
|
Help: "Count the number of times attestation not recovered and pruned because of missing block",
|
|
|
|
},
|
|
|
|
)
|
2019-08-28 15:14:22 +00:00
|
|
|
)
|