lighthouse/beacon_node/eth2_libp2p/src
divma fc07cc3fdf Sync metrics (#1975)
## 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)
2020-11-26 05:23:17 +00:00
..
behaviour Update logs + do not downscore peers if WE time out (#1901) 2020-11-16 04:06:14 +00:00
discovery Update bootnodes and boot_node cli (#1961) 2020-11-25 02:01:37 +11:00
peer_manager Sync metrics (#1975) 2020-11-26 05:23:17 +00:00
rpc Add additional libp2p tests (#1867) 2020-11-19 22:32:09 +00:00
types Add additional libp2p tests (#1867) 2020-11-19 22:32:09 +00:00
config.rs Add flag to import all attestations (#1941) 2020-11-22 23:58:25 +00:00
lib.rs Node endpoints (#1778) 2020-10-22 02:59:42 +00:00
metrics.rs Extended Gossipsub metrics (#1577) 2020-09-01 06:59:14 +00:00
service.rs Misc Peer sync info adjustments (#1896) 2020-11-13 09:00:10 +00:00