mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
Improve Gossipsub Rejection Metric (#13236)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -113,7 +113,7 @@ var (
|
||||
Name: "p2p_pubsub_reject_total",
|
||||
Help: "The number of messages rejected of a particular topic",
|
||||
},
|
||||
[]string{"topic"})
|
||||
[]string{"topic", "reason"})
|
||||
pubsubPeerThrottle = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "p2p_pubsub_throttle_total",
|
||||
Help: "The number of times a peer has been throttled for a particular topic",
|
||||
|
||||
@@ -67,7 +67,7 @@ func (g gossipTracer) DeliverMessage(msg *pubsub.Message) {
|
||||
|
||||
// RejectMessage .
|
||||
func (g gossipTracer) RejectMessage(msg *pubsub.Message, reason string) {
|
||||
pubsubMessageReject.WithLabelValues(*msg.Topic).Inc()
|
||||
pubsubMessageReject.WithLabelValues(*msg.Topic, reason).Inc()
|
||||
}
|
||||
|
||||
// DuplicateMessage .
|
||||
|
||||
Reference in New Issue
Block a user