Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Switch to using metric names from EIP-2159. (#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsutton authored Jul 11, 2019
1 parent 262b87f commit 7366ac3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public DefaultMutableBlockchain(
chainHeadOmmerCount = chainHeadBody.getOmmers().size();

metricsSystem.createLongGauge(
PantheonMetricCategory.BLOCKCHAIN,
"height",
"Height of the chainhead",
PantheonMetricCategory.ETHEREUM,
"blockchain_height",
"The current height of the canonical chain",
this::getChainHeadBlockNumber);
metricsSystem.createLongGauge(
PantheonMetricCategory.BLOCKCHAIN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public DefaultSynchronizer(
clock);

metricsSystem.createLongGauge(
PantheonMetricCategory.SYNCHRONIZER,
"best_known_block",
"Height of best known block from any connected peer",
PantheonMetricCategory.ETHEREUM,
"best_known_block_number",
"The estimated highest block available",
() -> syncState.syncStatus().getHighestBlock());
metricsSystem.createIntegerGauge(
PantheonMetricCategory.SYNCHRONIZER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ private RlpxAgent(
metricsSystem.createCounter(
PantheonMetricCategory.PEERS, "connected_total", "Total number of peers connected");

metricsSystem.createGauge(
PantheonMetricCategory.PEERS,
"peer_count_current",
"Number of peers currently connected",
() -> (double) getConnectionCount());
metricsSystem.createIntegerGauge(
PantheonMetricCategory.NETWORK,
"peers_limit",
"Maximum P2P peer connections that can be established",
PantheonMetricCategory.ETHEREUM,
"peer_count",
"The current number of peers connected",
this::getConnectionCount);
metricsSystem.createIntegerGauge(
PantheonMetricCategory.ETHEREUM,
"peer_limit",
"The maximum number of peers this node allows to connect",
() -> maxPeers);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

public enum PantheonMetricCategory implements MetricCategory {
BLOCKCHAIN("blockchain"),
ETHEREUM("ethereum", false),
EXECUTORS("executors"),
NETWORK("network"),
PEERS("peers"),
Expand Down

0 comments on commit 7366ac3

Please sign in to comment.