diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultMutableBlockchain.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultMutableBlockchain.java index 01fd200e0c..32a013dac9 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultMutableBlockchain.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultMutableBlockchain.java @@ -69,9 +69,9 @@ public class DefaultMutableBlockchain implements MutableBlockchain { 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, diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java index 83b3cf9e41..a6f8d06888 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java @@ -98,9 +98,9 @@ public class DefaultSynchronizer implements Synchronizer { 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, diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java index f2212e151a..949b1b07e4 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java @@ -96,15 +96,15 @@ public class 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); } diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java index 797fcec003..a5c06657b9 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java @@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableSet; public enum PantheonMetricCategory implements MetricCategory { BLOCKCHAIN("blockchain"), + ETHEREUM("ethereum", false), EXECUTORS("executors"), NETWORK("network"), PEERS("peers"),