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

[PAN-2877] Switch to using metric names from EIP-2159 #1634

Merged
merged 6 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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