Skip to content

Commit

Permalink
improve number of peers metric (#4527)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan <stefan.pingel@consensys.net>
  • Loading branch information
pinges authored Oct 13, 2022
1 parent 7cab18e commit 7c926d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public EthPeers(
"pending_peer_requests_current",
"Number of peer requests currently pending because peers are busy",
pendingRequests::size);
metricsSystem.createIntegerGauge(
BesuMetricCategory.ETHEREUM,
"peer_count",
"The current number of peers connected",
() -> (int) streamAvailablePeers().count());
}

public void registerConnection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ private RlpxAgent(
metricsSystem.createCounter(
BesuMetricCategory.PEERS, "connected_total", "Total number of peers connected");

metricsSystem.createIntegerGauge(
BesuMetricCategory.ETHEREUM,
"peer_count",
"The current number of peers connected",
this::getConnectionCount);
metricsSystem.createIntegerGauge(
BesuMetricCategory.ETHEREUM,
"peer_limit",
Expand Down

0 comments on commit 7c926d2

Please sign in to comment.