2019-08-16 13:13:04 -04:00
|
|
|
package sync
|
|
|
|
|
2019-08-28 11:14:22 -04:00
|
|
|
import (
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
messageReceivedCounter = promauto.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
2019-09-29 11:48:55 -07:00
|
|
|
Name: "p2p_message_received_total",
|
2019-08-28 11:14:22 -04:00
|
|
|
Help: "Count of messages received.",
|
|
|
|
},
|
|
|
|
[]string{"topic"},
|
|
|
|
)
|
2019-09-18 02:44:51 +05:30
|
|
|
messageReceivedBeforeChainStartCounter = promauto.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
2019-09-29 11:48:55 -07:00
|
|
|
Name: "p2p_message_received_before_chain_start",
|
2019-09-18 02:44:51 +05:30
|
|
|
Help: "Count of messages received before chain started.",
|
|
|
|
},
|
|
|
|
[]string{"topic"},
|
|
|
|
)
|
2019-09-29 22:23:19 -07: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"},
|
|
|
|
)
|
2019-08-28 11:14:22 -04:00
|
|
|
)
|