prysm-pulse/beacon-chain/sync/metrics.go
Nishant Das 03356fc7b5
Add Ability to Resync Node (#4279)
* add resyncing functionality

* add more validation to status message

* lint and build

* jim's review

* preston's review

* clean up

* remove log

* remove no sync

* change again

* change back

* remove spaces

* Update shared/slotutil/slottime.go

Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>

* Apply suggestions from code review

Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>

* fix refs

* raul's review

* goimports

* goimports

* add counter

* removed condition

* change back

* gaz

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-01-02 16:09:28 +08:00

44 lines
1.2 KiB
Go

package sync
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
messageReceivedCounter = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "p2p_message_received_total",
Help: "Count of messages received.",
},
[]string{"topic"},
)
messageReceivedBeforeChainStartCounter = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "p2p_message_received_before_chain_start",
Help: "Count of messages received before chain started.",
},
[]string{"topic"},
)
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"},
)
numberOfTimesResyncedCounter = promauto.NewCounter(
prometheus.CounterOpts{
Name: "number_of_times_resynced",
Help: "Count the number of times a node resyncs.",
},
)
)