diff --git a/grafana/block_verification.json b/grafana/block_verification.json index 2ab6f6b7..d5e77728 100644 --- a/grafana/block_verification.json +++ b/grafana/block_verification.json @@ -75,7 +75,7 @@ "steppedLine": false, "targets": [ { - "expr": "block_verified_block_height{job=\"$job\"}", + "expr": "zcash_chain_verified_block_height{job=\"$job\"}", "interval": "", "legendFormat": "verified block height", "refId": "A" @@ -179,7 +179,7 @@ "steppedLine": false, "targets": [ { - "expr": "block_verified_block_height{job=\"$job\"}", + "expr": "zcash_chain_verified_block_height{job=\"$job\"}", "interval": "", "legendFormat": "verified block height", "refId": "A" @@ -283,9 +283,9 @@ "steppedLine": false, "targets": [ { - "expr": "rate(block_verified_block_count{job=\"$job\"}[1s])", + "expr": "rate(zcash_chain_verified_block_total{job=\"$job\"}[1s])", "interval": "", - "legendFormat": "block_verified_block_count[1s]", + "legendFormat": "zcash_chain_verified_block_total[1s]", "refId": "A" }, { @@ -406,9 +406,9 @@ "steppedLine": false, "targets": [ { - "expr": "rate(block_verified_block_count{job=\"$job\"}[1s])", + "expr": "rate(zcash_chain_verified_block_total{job=\"$job\"}[1s])", "interval": "", - "legendFormat": "block_verified_block_count[1s]", + "legendFormat": "zcash_chain_verified_block_total[1s]", "refId": "A" }, { @@ -528,9 +528,9 @@ "steppedLine": false, "targets": [ { - "expr": "rate(block_verified_block_count{job=\"$job\"}[1s])", + "expr": "rate(zcash_chain_verified_block_total{job=\"$job\"}[1s])", "interval": "", - "legendFormat": "block_verified_block_count[1s]", + "legendFormat": "zcash_chain_verified_block_total[1s]", "refId": "A" }, { @@ -651,9 +651,9 @@ "steppedLine": false, "targets": [ { - "expr": "rate(block_verified_block_count{job=\"$job\"}[1s])", + "expr": "rate(zcash_chain_verified_block_total{job=\"$job\"}[1s])", "interval": "", - "legendFormat": "block_verified_block_count[1s]", + "legendFormat": "zcash_chain_verified_block_total[1s]", "refId": "A" }, { @@ -735,14 +735,14 @@ ] }, "datasource": "Prometheus-Zebra", - "definition": "label_values(block_verified_block_height, job)", + "definition": "label_values(zcash_chain_verified_block_height, job)", "hide": 0, "includeAll": true, "label": null, "multi": true, "name": "job", "options": [], - "query": "label_values(block_verified_block_height, job)", + "query": "label_values(zcash_chain_verified_block_height, job)", "refresh": 1, "regex": "", "skipUrlSync": false, diff --git a/grafana/network_health.json b/grafana/network_health.json index e54fd0be..162c9799 100644 --- a/grafana/network_health.json +++ b/grafana/network_health.json @@ -76,14 +76,14 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(bytes_read{job=\"$job\"}[1s]))", + "expr": "sum(rate(zcash_net_in_bytes_total{job=\"$job\"}[1s]))", "hide": false, "interval": "", "legendFormat": "bytes read [1s]", "refId": "A" }, { - "expr": "sum(rate(bytes_written{job=\"$job\"}[1s]))", + "expr": "sum(rate(zcash_net_out_bytes_total{job=\"$job\"}[1s]))", "interval": "", "legendFormat": "bytes written [1s]", "refId": "B" @@ -188,14 +188,14 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(bytes_read{job=\"$job\"}[1s]))", + "expr": "sum(rate(zcash_net_in_bytes_total{job=\"$job\"}[1s]))", "hide": false, "interval": "", "legendFormat": "bytes read [1s]", "refId": "A" }, { - "expr": "sum(rate(bytes_written{job=\"$job\"}[1s]))", + "expr": "sum(rate(zcash_net_out_bytes_total{job=\"$job\"}[1s]))", "interval": "", "legendFormat": "bytes written [1s]", "refId": "B" @@ -299,7 +299,7 @@ "steppedLine": false, "targets": [ { - "expr": "pool_num_peers{job=\"$job\"}", + "expr": "zcash_net_peers{job=\"$job\"}", "interval": "", "legendFormat": "total peers", "refId": "A" @@ -416,7 +416,7 @@ "steppedLine": false, "targets": [ { - "expr": "pool_num_peers{job=\"$job\"}", + "expr": "zcash_net_peers{job=\"$job\"}", "interval": "", "legendFormat": "total peers", "refId": "A" @@ -763,14 +763,14 @@ ] }, "datasource": "Prometheus-Zebra", - "definition": "label_values(bytes_read, job)", + "definition": "label_values(zcash_net_in_bytes_total, job)", "hide": 0, "includeAll": true, "label": null, "multi": true, "name": "job", "options": [], - "query": "label_values(bytes_read, job)", + "query": "label_values(zcash_net_in_bytes_total, job)", "refresh": 1, "regex": "", "skipUrlSync": false, diff --git a/zebra-consensus/src/block.rs b/zebra-consensus/src/block.rs index 5fb25109..4de70472 100644 --- a/zebra-consensus/src/block.rs +++ b/zebra-consensus/src/block.rs @@ -198,8 +198,8 @@ where // Update the metrics after all the validation is finished tracing::trace!("verified block"); - metrics::gauge!("block.verified.block.height", height.0 as _); - metrics::counter!("block.verified.block.count", 1); + metrics::gauge!("zcash.chain.verified.block.height", height.0 as _); + metrics::counter!("zcash.chain.verified.block.total", 1); // Finally, submit the block for contextual verification. let new_outputs = Arc::try_unwrap(known_utxos) diff --git a/zebra-network/src/peer/handshake.rs b/zebra-network/src/peer/handshake.rs index 2d859724..42e33f29 100644 --- a/zebra-network/src/peer/handshake.rs +++ b/zebra-network/src/peer/handshake.rs @@ -364,7 +364,7 @@ where let peer_tx = peer_tx.with(move |msg: Message| { // Add a metric for outbound messages. // XXX add a dimension tagging message metrics by type - metrics::counter!("peer.outbound_messages", 1, "addr" => addr.to_string()); + metrics::counter!("zcash.net.out.messages", 1, "addr" => addr.to_string()); // We need to use future::ready rather than an async block here, // because we need the sink to be Unpin, and the With // returned by .with is Unpin only if Fut is Unpin, and the @@ -380,7 +380,7 @@ where if msg.is_ok() { // XXX add a dimension tagging message metrics by type metrics::counter!( - "inbound_messages", + "zcash.net.in.messages", 1, "addr" => addr.to_string(), ); diff --git a/zebra-network/src/peer_set/set.rs b/zebra-network/src/peer_set/set.rs index eb756fb4..5c52164e 100644 --- a/zebra-network/src/peer_set/set.rs +++ b/zebra-network/src/peer_set/set.rs @@ -386,7 +386,7 @@ where let num_peers = num_ready + num_unready; metrics::gauge!("pool.num_ready", num_ready as f64); metrics::gauge!("pool.num_unready", num_unready as f64); - metrics::gauge!("pool.num_peers", num_peers as f64); + metrics::gauge!("zcash.net.peers", num_peers as f64); } } diff --git a/zebra-network/src/protocol/external/codec.rs b/zebra-network/src/protocol/external/codec.rs index c0f14e58..a290e9ed 100644 --- a/zebra-network/src/protocol/external/codec.rs +++ b/zebra-network/src/protocol/external/codec.rs @@ -117,7 +117,7 @@ impl Encoder for Codec { } if let Some(label) = self.builder.metrics_label.clone() { - metrics::counter!("bytes.written", (body_length + HEADER_LEN) as u64, "addr" => label); + metrics::counter!("zcash.net.out.bytes.total", (body_length + HEADER_LEN) as u64, "addr" => label); } use Message::*; @@ -366,7 +366,7 @@ impl Decoder for Codec { } if let Some(label) = self.builder.metrics_label.clone() { - metrics::counter!("bytes.read", (body_len + HEADER_LEN) as u64, "addr" => label); + metrics::counter!("zcash.net.in.bytes.total", (body_len + HEADER_LEN) as u64, "addr" => label); } // Reserve buffer space for the expected body and the following header.