You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: remove unneeded vergen dep
* feat: add network peer connection metrics
Add the following metrics from the leanMetrics specification:
- lean_connected_peers: Gauge with client label tracking connected peer count
- lean_peer_connection_events_total: Counter with direction and result labels
- lean_peer_disconnection_events_total: Counter with direction and reason labels
Connection events are tracked in the p2p event loop by handling
SwarmEvent::ConnectionEstablished, SwarmEvent::ConnectionClosed,
SwarmEvent::OutgoingConnectionError, and SwarmEvent::IncomingConnectionError.
* refactor: unify metrics functions
* fix: follow spec in /metrics and /health responses
See https://github.com/leanEthereum/leanSpec/blob/914e09333578072c6bf02d2d405f8c13d5b55d38/src/lean_spec/subspecs/api/server.py#L36-L46
* fix: take into account multiple connections to same peer
* fix: avoid dialing ourselves
* fix: use reason matching in connection closed
* feat: add node name to peer metrics
* docs: mark metrics as supported in metrics.md
* chore: fix clippy lints
|`lean_connected_peers`| Gauge | Number of connected peers | On scrape | client=lantern,qlean,ream,zeam |□|
69
-
|`lean_peer_connection_events_total`| Counter | Total number of peer connection events | On peer connection | direction=inbound,outbound<br>result=success,timeout,error |□|
70
-
|`lean_peer_disconnection_events_total`| Counter | Total number of peer disconnection events | On peer disconnection | direction=inbound,outbound<br>reason=timeout,remote_close,local_close,error |□|
68
+
|`lean_connected_peers`| Gauge | Number of connected peers | On scrape | client=lantern,qlean,ream,zeam |✅(*)|
69
+
|`lean_peer_connection_events_total`| Counter | Total number of peer connection events | On peer connection | direction=inbound,outbound<br>result=success,timeout,error |✅|
70
+
|`lean_peer_disconnection_events_total`| Counter | Total number of peer disconnection events | On peer disconnection | direction=inbound,outbound<br>reason=timeout,remote_close,local_close,error |✅|
0 commit comments