mirror of https://github.com/vacp2p/nim-libp2p.git
use declareCounter rather then gauge for certain metrics
This commit is contained in:
parent
a6a2a81711
commit
82b4ed8f44
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue