Switch to using metric names from EIP-2159. (#1634)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Adrian Sutton 5 years ago committed by GitHub
parent 961298fd99
commit 351fb679cf
  1. 6
      ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultMutableBlockchain.java
  2. 6
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java
  3. 16
      ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java
  4. 1
      metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java

@ -69,9 +69,9 @@ public class DefaultMutableBlockchain implements MutableBlockchain {
chainHeadOmmerCount = chainHeadBody.getOmmers().size(); chainHeadOmmerCount = chainHeadBody.getOmmers().size();
metricsSystem.createLongGauge( metricsSystem.createLongGauge(
PantheonMetricCategory.BLOCKCHAIN, PantheonMetricCategory.ETHEREUM,
"height", "blockchain_height",
"Height of the chainhead", "The current height of the canonical chain",
this::getChainHeadBlockNumber); this::getChainHeadBlockNumber);
metricsSystem.createLongGauge( metricsSystem.createLongGauge(
PantheonMetricCategory.BLOCKCHAIN, PantheonMetricCategory.BLOCKCHAIN,

@ -98,9 +98,9 @@ public class DefaultSynchronizer<C> implements Synchronizer {
clock); clock);
metricsSystem.createLongGauge( metricsSystem.createLongGauge(
PantheonMetricCategory.SYNCHRONIZER, PantheonMetricCategory.ETHEREUM,
"best_known_block", "best_known_block_number",
"Height of best known block from any connected peer", "The estimated highest block available",
() -> syncState.syncStatus().getHighestBlock()); () -> syncState.syncStatus().getHighestBlock());
metricsSystem.createIntegerGauge( metricsSystem.createIntegerGauge(
PantheonMetricCategory.SYNCHRONIZER, PantheonMetricCategory.SYNCHRONIZER,

@ -96,15 +96,15 @@ public class RlpxAgent {
metricsSystem.createCounter( metricsSystem.createCounter(
PantheonMetricCategory.PEERS, "connected_total", "Total number of peers connected"); 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( metricsSystem.createIntegerGauge(
PantheonMetricCategory.NETWORK, PantheonMetricCategory.ETHEREUM,
"peers_limit", "peer_count",
"Maximum P2P peer connections that can be established", "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); () -> maxPeers);
} }

@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableSet;
public enum PantheonMetricCategory implements MetricCategory { public enum PantheonMetricCategory implements MetricCategory {
BLOCKCHAIN("blockchain"), BLOCKCHAIN("blockchain"),
ETHEREUM("ethereum", false),
EXECUTORS("executors"), EXECUTORS("executors"),
NETWORK("network"), NETWORK("network"),
PEERS("peers"), PEERS("peers"),

Loading…
Cancel
Save