Use interoperable names for common metrics
These names match the equivalent metrics in zcashd, enabling common metrics to be collected across both node types.
This commit is contained in:
parent
9c0c2f0848
commit
e51f33a4b9
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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<Fut, ...>
|
||||
// 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(),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ impl Encoder<Message> 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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue