mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
fix(telemetry): resolve sub-ms span buckets and unmatchable consensus_mode filter
Two live-verified dashboard defects found while auditing the devnet nodes. Sub-millisecond spanmetrics buckets. The ladder started at 1ms, but most xrpld spans are far below that: tx.preflight means ~0.012ms and tx.preclaim ~0.15ms. On the live nodes the first bucket held 13,761,009 of 13,761,419 tx.preflight samples (99.997%), so histogram_quantile pinned every p95/p99 at a constant 0.95ms and ~10 latency panels reported a boundary artifact rather than a measurement. Adds 0.01/0.05/0.1/0.25/0.5ms ahead of 1ms in all three bucket lists, which must stay identical or the connector misbuckets. consensus_mode filter on spans that never carry the label. Only consensus.round and consensus.ledger_close are stamped with consensus_mode (verified against live series), so panels 1, 3, 12 and 14 -- which query consensus.validation.send, consensus.proposal.send and consensus.accept.apply -- blanked as soon as an operator picked any value from the Consensus Mode dropdown. Drops the selector from those four; ids 2 and 11 keep it because their spans do carry it. Note: existing histogram series retain the old le boundaries, so span-latency panels show a discontinuity at collector restart.
This commit is contained in:
@@ -191,12 +191,16 @@ otelcol.connector.spanmetrics "xrpld" {
|
||||
explicit {
|
||||
// Buckets MUST stay strictly ascending (the connector binary-searches
|
||||
// them and silently misbuckets otherwise) and MUST match the two
|
||||
// otel-collector-config*.yaml lists. Sub-MILLISECOND boundaries exist
|
||||
// because most xrpld spans sit far below 1ms (tx.preflight means
|
||||
// ~0.012ms): a 1ms floor put >99.99% of samples in bucket one and pinned
|
||||
// every p95/p99 at a constant 0.95ms.
|
||||
// otel-collector-config*.yaml lists. Sub-second boundaries cover
|
||||
// RPC/tx/ledger spans; 2s-4s resolve second-scale consensus spans
|
||||
// (consensus.round ~3.9s, consensus.establish ~1.9s) that used to pile
|
||||
// into one 1s-5s bucket; 10s/30s give the ledger.acquire catch-up tail
|
||||
// (~17% exceeds 5s) a measurable home so its p95/p99 stop reading +Inf.
|
||||
buckets = ["1ms", "5ms", "10ms", "25ms", "50ms", "100ms", "250ms", "500ms", "1s", "2s", "3s", "4s", "5s", "10s", "30s"]
|
||||
buckets = ["0.01ms", "0.05ms", "0.1ms", "0.25ms", "0.5ms", "1ms", "5ms", "10ms", "25ms", "50ms", "100ms", "250ms", "500ms", "1s", "2s", "3s", "4s", "5s", "10s", "30s"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"expr": "label_replace(label_join(label_replace(sum by (service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_calls_total{service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\", consensus_mode=~\"$consensus_mode\", span_name=\"consensus.validation.send\"}[$__rate_interval])), \"series\", \"Validations / Sec\", \"\", \"\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
"expr": "label_replace(label_join(label_replace(sum by (service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_calls_total{service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\", span_name=\"consensus.validation.send\"}[$__rate_interval])), \"series\", \"Validations / Sec\", \"\", \"\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
@@ -138,7 +138,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"expr": "label_replace(label_join(label_replace(sum by (service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_calls_total{service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\", consensus_mode=~\"$consensus_mode\", span_name=\"consensus.proposal.send\"}[$__rate_interval])), \"series\", \"Proposals / Sec\", \"\", \"\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
"expr": "label_replace(label_join(label_replace(sum by (service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_calls_total{service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\", span_name=\"consensus.proposal.send\"}[$__rate_interval])), \"series\", \"Proposals / Sec\", \"\", \"\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
@@ -547,7 +547,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"expr": "label_replace(label_join(label_replace(histogram_quantile(0.95, sum by (le, service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_duration_milliseconds_bucket{service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\", consensus_mode=~\"$consensus_mode\", span_name=\"consensus.accept.apply\"}[5m]))), \"series\", \"P95 Apply Duration\", \"\", \"\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
"expr": "label_replace(label_join(label_replace(histogram_quantile(0.95, sum by (le, service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_duration_milliseconds_bucket{service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\", span_name=\"consensus.accept.apply\"}[5m]))), \"series\", \"P95 Apply Duration\", \"\", \"\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
@@ -628,7 +628,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"expr": "label_replace(label_join(label_replace(sum by (close_time_correct, service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_calls_total{span_name=\"consensus.accept.apply\", consensus_mode=~\"$consensus_mode\", service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\"}[$__rate_interval])), \"series\", \"$1\", \"close_time_correct\", \"(.*)\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
"expr": "label_replace(label_join(label_replace(sum by (close_time_correct, service_instance_id, xrpl_branch, xrpl_node_role) (rate(span_calls_total{span_name=\"consensus.accept.apply\", service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\", xrpl_work_item=~\"$xrpl_work_item\", xrpl_branch=~\"$xrpl_branch\", xrpl_node_role=~\"$xrpl_node_role\"}[$__rate_interval])), \"series\", \"$1\", \"close_time_correct\", \"(.*)\"), \"xrpl_ident\", \", \", \"service_instance_id\", \"xrpl_branch\", \"xrpl_work_item\"), \"xrpl_ident\", \"[$1]\", \"xrpl_ident\", \"(?:, )*(.*[^, ])(?:, )*\")"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
|
||||
@@ -150,7 +150,11 @@ connectors:
|
||||
unit: ms
|
||||
explicit:
|
||||
# Buckets MUST stay strictly ascending (the connector binary-searches
|
||||
# them and silently misbuckets otherwise). Sub-second boundaries cover
|
||||
# them and silently misbuckets otherwise). Sub-MILLISECOND boundaries
|
||||
# (0.01-0.5ms) exist because most xrpld spans are far below 1ms --
|
||||
# tx.preflight means ~0.012ms, tx.preclaim ~0.15ms -- so a 1ms floor
|
||||
# put >99.99% of samples in the first bucket and pinned every p95/p99
|
||||
# at a constant 0.95ms. Sub-second boundaries cover
|
||||
# RPC/tx/ledger spans; the 2s-4s boundaries resolve second-scale
|
||||
# consensus spans (consensus.round ~3.9s, consensus.establish ~1.9s)
|
||||
# that used to pile into a single 1s-5s bucket; 10s/30s give the
|
||||
@@ -158,6 +162,11 @@ connectors:
|
||||
# home so its p95/p99 stop reading as +Inf.
|
||||
buckets:
|
||||
[
|
||||
0.01ms,
|
||||
0.05ms,
|
||||
0.1ms,
|
||||
0.25ms,
|
||||
0.5ms,
|
||||
1ms,
|
||||
5ms,
|
||||
10ms,
|
||||
|
||||
@@ -129,7 +129,11 @@ connectors:
|
||||
unit: ms
|
||||
explicit:
|
||||
# Buckets MUST stay strictly ascending (the connector binary-searches
|
||||
# them and silently misbuckets otherwise). Sub-second boundaries cover
|
||||
# them and silently misbuckets otherwise). Sub-MILLISECOND boundaries
|
||||
# (0.01-0.5ms) exist because most xrpld spans are far below 1ms --
|
||||
# tx.preflight means ~0.012ms, tx.preclaim ~0.15ms -- so a 1ms floor
|
||||
# put >99.99% of samples in the first bucket and pinned every p95/p99
|
||||
# at a constant 0.95ms. Sub-second boundaries cover
|
||||
# RPC/tx/ledger spans; the 2s-4s boundaries resolve second-scale
|
||||
# consensus spans (consensus.round ~3.9s, consensus.establish ~1.9s)
|
||||
# that used to pile into a single 1s-5s bucket; 10s/30s give the
|
||||
@@ -137,6 +141,11 @@ connectors:
|
||||
# home so its p95/p99 stop reading as +Inf.
|
||||
buckets:
|
||||
[
|
||||
0.01ms,
|
||||
0.05ms,
|
||||
0.1ms,
|
||||
0.25ms,
|
||||
0.5ms,
|
||||
1ms,
|
||||
5ms,
|
||||
10ms,
|
||||
|
||||
Reference in New Issue
Block a user