-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(metrics): expose connected_peers, peers_in_rt and uptime metrics #1896
Conversation
@@ -589,7 +589,7 @@ impl NetworkBuilder { | |||
listen_port: self.listen_addr.map(|addr| addr.port()), | |||
is_client, | |||
is_behind_home_network: self.is_behind_home_network, | |||
connected_peers: 0, | |||
peers_in_rt: 0, |
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.
This tracks the total number of peers in the RT rather than the "connections". So renamed it for clarity.
info!("Evicted old peer on new peer join: {old_peer:?}"); | ||
self.send_event(NetworkEvent::PeerRemoved(peer, self.connected_peers)); |
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.
We were supposed to emit PeerRemoved(old_peer)
instead of peer
here.
8b2b3c4
to
1d993a7
Compare
peers_in_rt
,connected_peers
,live_connections
anduptime