-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve libp2p connected peer metrics #5314
Conversation
66c259b
to
9cd74a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we run these changes?
We've switched from setting the gauges for connected to peers to solely relying on increment and decrement. I'm worried there's a thousand edge-cases where peers disconnect/connect and we don't account for them putting these metrics off.
If the peer-count metric is off, it will be something we'll need to fix urgently.
9cd74a2
to
49d42f1
Compare
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at a89ff10 |
* patch rust-yamux dep * improve libp2p connected peer metrics
Issue Addressed
submits #4870 reworked with #5265 addressed:
libp2p_peers_connected
metric as its standardPEERS_CONNECTED_MULTI
which contains the sum of all the peers connected as anIntGaugeVec
which means it descriminates per direction and transportNETWORK_INBOUND_PEERS
andNETWORK_INBOUND_PEERS
as they are covered byPEERS_CONNECTED_MULTI
and are not standardDISCOVERY_BYTES
which gathers all the transferred discovery bytes which can be discriminated by outbound and inbound.DISCOVERY_SENT_BYTES
andDISCOVERY_RECV_BYTES
as they are covered byDISCOVERY_BYTES
update_connected_peer_metrics
function, we increment and decrement the number of peers onPeerManager
NetworkBehaviour
'sFromSwarm::ConnectionEstablished
andFromSwarm::ConnectionClosed
events, andPEERS_PER_CLIENT
is already updated when we identify a client.