Compare commits

...

1 Commits

Author SHA1 Message Date
nisdas
4d0f6ea82e add it 2023-07-16 21:36:32 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,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",

View File

@@ -58,7 +58,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 .