Skip to content

Conversation

@divagant-martian
Copy link
Contributor

@divagant-martian divagant-martian commented Nov 25, 2020

Issue Addressed

  • Add metrics to keep track of peer counts by sync type
  • Add metric to keep track of the number of syncing chains in range

Proposed Changes

Plugin to the network metrics update interval and update too the counts for peers wrt to their sync status with us

Additional Info

For the peer counts

  • By the way it is implemented the numbers won't always match to the total peer count in the libp2p metric.
  • Updating the gauge with every change is messy because it requires to be updated on connection (in the eth2_libp2p crate, while metrics are defined in the network crate) on Goodbye sent (for an IrrelevantPeer) either in the beacon_processor or the peer_manager, and on disconnection. Since this is not a critical metric I think counting once every second is enough. If you think more accuracy is needed we can do it too, but it would be harder to maintain)

ATM those look like this
image

@divagant-martian divagant-martian changed the title Peer sync type metrics Sync metrics Nov 25, 2020
Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

Would be nice to have an accompanying PR in lighthouse-metrics with it.

As this is still in draft, I'm going to be selfish and try and merge tokio-0.3 in first, as there will be conflicts :p

@divagant-martian divagant-martian marked this pull request as ready for review November 25, 2020 23:35
@divagant-martian
Copy link
Contributor Author

accompanying PR in lighthouse-metrics: sigp/lighthouse-metrics#11

@AgeManning
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Nov 26, 2020
## Issue Addressed
- Add metrics to keep track of peer counts by sync type
- Add metric to keep track of the number of syncing chains in range

## Proposed Changes
Plugin to the network metrics update interval and update too the counts for peers wrt to their sync status with us

## Additional Info
For the peer counts
- By the way it is implemented the numbers won't always match to the total peer count in the `libp2p` metric.
- Updating the gauge with every change is messy because it requires to be updated on connection (in the `eth2_libp2p` crate, while metrics are defined in the `network` crate) on Goodbye sent (for an `IrrelevantPeer`) either in the `beacon_processor` or the `peer_manager`, and on disconnection. Since this is not a critical metric I think counting once every second is enough. If you think more accuracy is needed we can do it too, but it would be harder to maintain)

ATM those look like this
![image](https://user-images.githubusercontent.com/26765164/100275387-22137b00-2f60-11eb-93b9-94b0f265240c.png)
@bors
Copy link

bors bot commented Nov 26, 2020

@bors bors bot changed the title Sync metrics [Merged by Bors] - Sync metrics Nov 26, 2020
@bors bors bot closed this Nov 26, 2020
@divagant-martian divagant-martian deleted the peer-sync-type-metrics branch January 4, 2021 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants