Add interop metrics (#2645)

## Issue Addressed

Resolves: #2644

## Proposed Changes

- Adds mandatory metrics mentioned here: https://github.com/ethereum/beacon-metrics/blob/master/metrics.md#interop-metrics

## Additional Info

Couldn't figure out how to alias metrics, so I created them all as new gauges/counters.

Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
realbigsean
2021-09-29 23:44:24 +00:00
parent c0122e1a52
commit 7d13e57d9f
4 changed files with 49 additions and 12 deletions

View File

@@ -9,6 +9,8 @@ lazy_static! {
"libp2p_peer_connected_peers_total",
"Count of libp2p peers currently connected"
);
pub static ref PEERS_CONNECTED_INTEROP: Result<IntGauge> =
try_create_int_gauge("libp2p_peers", "Count of libp2p peers currently connected");
pub static ref PEER_CONNECT_EVENT_COUNT: Result<IntCounter> = try_create_int_counter(
"libp2p_peer_connect_event_total",
"Count of libp2p peer connect events (not the current number of connected peers)"