Skip to content

Commit

Permalink
Add libp2p topic to pubsub's protobuf logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzo Delgado committed Nov 3, 2022
1 parent a3e9d1e commit c2e1c80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions libp2p/protocols/pubsub/gossipsub/behavior.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import ".."/[pubsubpeer, peertable, timedcache, mcache, floodsub, pubsub]
import "../rpc"/[messages]
import "../../.."/[peerid, multiaddress, utility, switch, routing_record, signed_envelope, utils/heartbeat]

logScope:
topics = "libp2p gossipsub"

declareGauge(libp2p_gossipsub_cache_window_size, "the number of messages in the cache")
declareGauge(libp2p_gossipsub_peers_per_topic_mesh, "gossipsub peers per topic in mesh", labels = ["topic"])
declareGauge(libp2p_gossipsub_peers_per_topic_fanout, "gossipsub peers per topic in fanout", labels = ["topic"])
Expand Down
2 changes: 1 addition & 1 deletion libp2p/protocols/pubsub/rpc/protobuf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import messages,


logScope:
topics = "pubsubprotobuf"
topics = "libp2p pubsubprotobuf"

when defined(libp2p_protobuf_metrics):
import metrics
Expand Down

0 comments on commit c2e1c80

Please sign in to comment.