mirror of
https://github.com/codex-storage/nim-libp2p.git
synced 2025-01-12 20:14:09 +00:00
metrics: fix pubsub_peers add metric
This commit is contained in:
parent
fcda0f6ce1
commit
c7895ccc52
@ -144,6 +144,10 @@ proc getOrCreatePeer(p: PubSub,
|
|||||||
|
|
||||||
p.peers[peer.id] = peer
|
p.peers[peer.id] = peer
|
||||||
peer.observers = p.observers
|
peer.observers = p.observers
|
||||||
|
|
||||||
|
# metrics
|
||||||
|
libp2p_pubsub_peers.set(p.peers.len.int64)
|
||||||
|
|
||||||
return peer
|
return peer
|
||||||
|
|
||||||
method handleConn*(p: PubSub,
|
method handleConn*(p: PubSub,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user