diff --git a/libp2p/protocols/pubsub/pubsub.nim b/libp2p/protocols/pubsub/pubsub.nim index d7b98a708..2dd811e91 100644 --- a/libp2p/protocols/pubsub/pubsub.nim +++ b/libp2p/protocols/pubsub/pubsub.nim @@ -24,8 +24,8 @@ logScope: declareGauge(libp2p_pubsub_peers, "pubsub peer instances") declareGauge(libp2p_pubsub_topics, "pubsub subscribed topics") -declareGauge(libp2p_pubsub_validation_success, "pubsub successfully validated messages") -declareGauge(libp2p_pubsub_validation_failure, "pubsub failed validated messages") +declareCounter(libp2p_pubsub_validation_success, "pubsub successfully validated messages") +declareCounter(libp2p_pubsub_validation_failure, "pubsub failed validated messages") declareGauge(libp2p_pubsub_peers_per_topic, "pubsub peers per topic", labels = ["topic"]) type diff --git a/libp2p/protocols/pubsub/pubsubpeer.nim b/libp2p/protocols/pubsub/pubsubpeer.nim index 85e4b2950..e2a07f591 100644 --- a/libp2p/protocols/pubsub/pubsubpeer.nim +++ b/libp2p/protocols/pubsub/pubsubpeer.nim @@ -42,8 +42,8 @@ type RPCHandler* = proc(peer: PubSubPeer, msg: seq[RPCMsg]): Future[void] {.gcsafe.} -declareGauge(libp2p_pubsub_encoded_messages, "number of messages encoded") -declareGauge(libp2p_pubsub_decoded_messages, "number of messages decoded") +declareCounter(libp2p_pubsub_encoded_messages, "number of messages encoded") +declareCounter(libp2p_pubsub_decoded_messages, "number of messages decoded") proc id*(p: PubSubPeer): string = p.peerInfo.id diff --git a/libp2p/protocols/pubsub/rpc/message.nim b/libp2p/protocols/pubsub/rpc/message.nim index fdf72e35b..5ceeed8d5 100644 --- a/libp2p/protocols/pubsub/rpc/message.nim +++ b/libp2p/protocols/pubsub/rpc/message.nim @@ -22,8 +22,8 @@ logScope: const PubSubPrefix = "libp2p-pubsub:" -declareGauge(libp2p_pubsub_sig_verify_success, "pubsub successfully validated messages") -declareGauge(libp2p_pubsub_sig_verify_failure, "pubsub failed validated messages") +declareCounter(libp2p_pubsub_sig_verify_success, "pubsub successfully validated messages") +declareCounter(libp2p_pubsub_sig_verify_failure, "pubsub failed validated messages") proc msgIdProvider(m: Message): string = ## default msg id provider