mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
fix(telemetry): repair the five silently-empty TraceQL panels on consensus-health
All five TraceQL panels on this dashboard returned nothing, and did so without any visible error: they filtered on span.close_time_correct=~"$close_time_correct", but close_time_correct is a boolean attribute (RCLConsensus.cpp:601 passes a raw bool), and Tempo restricts the regex operator to string operands, so the spanset resolved to false. With the variable defaulting to All the clause rendered as =~".*", so the panels were empty out of the box and looked exactly like a node with no consensus activity. Note this is the opposite of PromQL, where an absent or empty label does match ".*" — which is why the 17 Prometheus panels on this same board were unaffected and the dashboard appeared healthy. Dropped the clause from all six queries, matching phases 9 and 10 where it is already gone. The $close_time_correct variable now filters the Prometheus "Close Time Agreement" panel instead, which already grouped by that label but never filtered on it, so the control stays useful rather than becoming dead UI. Two defects were masked behind the empty panels and are fixed too: - "Close Time: Raw Proposals" and "Close Time: Effective / Quantized" carried unit dateTimeFromNow over close_time_self/close_time, which are NetClock seconds (Ripple epoch), while Grafana's dateTime formatters expect a millisecond Unix epoch — every point would have rendered as roughly 1970. They now plot as plain numbers with the axis labelled "NetClock Seconds (Ripple Epoch)", and the descriptions give the 946684800 offset for converting to Unix time. - "Close Time Vote Bins & Resolution" matched its unit and axis overrides byName against "Vote Bins" and "Resolution", which are not field names; TraceQL select() yields close_time_vote_bins and close_resolution_ms, so neither override applied. Switched to byRegexp so the match holds whichever scope prefix Grafana emits. No panel was added or removed: the (type, title) multiset is unchanged at 22. resolution_direction keeps its regex filter, which is correct there — it is set from a std::string whose values are exactly the variable's increased/decreased/unchanged.
This commit is contained in:
@@ -229,7 +229,7 @@
|
||||
"datasource": {
|
||||
"type": "prometheus"
|
||||
},
|
||||
"expr": "sum by (close_time_correct, service_instance_id) (rate(traces_span_metrics_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\"}[$__rate_interval]))",
|
||||
"expr": "sum by (close_time_correct, service_instance_id) (rate(traces_span_metrics_calls_total{span_name=\"consensus.accept.apply\", close_time_correct=~\"$close_time_correct\", consensus_mode=~\"$consensus_mode\", service_instance_id=~\"$node\", deployment_environment=~\"$deployment_environment\", xrpl_network_type=~\"$xrpl_network_type\", service_name=~\"$service_name\"}[$__rate_interval]))",
|
||||
"legendFormat": "Close Time Correct={{close_time_correct}} [{{service_instance_id}}]"
|
||||
}
|
||||
],
|
||||
@@ -430,7 +430,7 @@
|
||||
},
|
||||
{
|
||||
"title": "Close Time: Raw Proposals (Per Node)",
|
||||
"description": "**What:** Each node's raw, unrounded proposed close time at the instant it closed its ledger.\n**How it's computed:** Latest raw close-time value per node, plotted per round.\n**Reading it:** Compare nodes at the same round; values should cluster tightly.\n**Healthy range:** All nodes within a few seconds of each other.\n**Watch for:** A node consistently offset from the pack indicates local clock drift.\n**Source:** src/xrpld/app/consensus/RCLConsensus.cpp:RCLConsensus::Adaptor::doAccept",
|
||||
"description": "**What:** Each node's raw, unrounded proposed close time at the instant it closed its ledger.\n**How it's computed:** Latest raw close-time value per node, plotted per round. Values are NetClock seconds (Ripple epoch, 2000-01-01); add 946684800 for Unix time.\n**Reading it:** Compare nodes at the same round; values should cluster tightly.\n**Healthy range:** All nodes within a few seconds of each other.\n**Watch for:** A node consistently offset from the pack indicates local clock drift.\n**Source:** src/xrpld/app/consensus/RCLConsensus.cpp:RCLConsensus::Adaptor::doAccept",
|
||||
"type": "timeseries",
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -440,12 +440,13 @@
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "dateTimeFromNow",
|
||||
"unit": "none",
|
||||
"custom": {
|
||||
"spanNulls": 1800000,
|
||||
"drawStyle": "points",
|
||||
"pointSize": 6,
|
||||
"showPoints": "always"
|
||||
"showPoints": "always",
|
||||
"axisLabel": "NetClock Seconds (Ripple Epoch)"
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
@@ -468,14 +469,14 @@
|
||||
"type": "tempo"
|
||||
},
|
||||
"queryType": "traceql",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.close_time_correct=~\"$close_time_correct\"} | select(span.close_time_self)",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\"} | select(span.close_time_self)",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Close Time: Effective / Quantized",
|
||||
"description": "**What:** The consensus-agreed close time after rounding to the active resolution bin, i.e. the value written to the ledger header.\n**How it's computed:** Latest effective close-time value per node, plotted per round.\n**Reading it:** All in-agreement nodes should report the identical value each round.\n**Healthy range:** Identical across agreeing nodes.\n**Watch for:** Nodes reporting different effective values are not in close-time agreement for that round.\n**Source:** src/xrpld/app/consensus/RCLConsensus.cpp:RCLConsensus::Adaptor::doAccept",
|
||||
"description": "**What:** The consensus-agreed close time after rounding to the active resolution bin, i.e. the value written to the ledger header.\n**How it's computed:** Latest effective close-time value per node, plotted per round. Values are NetClock seconds (Ripple epoch, 2000-01-01); add 946684800 for Unix time.\n**Reading it:** All in-agreement nodes should report the identical value each round.\n**Healthy range:** Identical across agreeing nodes.\n**Watch for:** Nodes reporting different effective values are not in close-time agreement for that round.\n**Source:** src/xrpld/app/consensus/RCLConsensus.cpp:RCLConsensus::Adaptor::doAccept",
|
||||
"type": "timeseries",
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -485,12 +486,13 @@
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "dateTimeFromNow",
|
||||
"unit": "none",
|
||||
"custom": {
|
||||
"spanNulls": 1800000,
|
||||
"drawStyle": "points",
|
||||
"pointSize": 6,
|
||||
"showPoints": "always"
|
||||
"showPoints": "always",
|
||||
"axisLabel": "NetClock Seconds (Ripple Epoch)"
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
@@ -513,7 +515,7 @@
|
||||
"type": "tempo"
|
||||
},
|
||||
"queryType": "traceql",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.close_time_correct=~\"$close_time_correct\"} | select(span.close_time)",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\"} | select(span.close_time)",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
@@ -541,8 +543,8 @@
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Vote Bins"
|
||||
"id": "byRegexp",
|
||||
"options": ".*vote_bins.*"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
@@ -557,8 +559,8 @@
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Resolution"
|
||||
"id": "byRegexp",
|
||||
"options": ".*close_resolution_ms.*"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
@@ -591,7 +593,7 @@
|
||||
"type": "tempo"
|
||||
},
|
||||
"queryType": "traceql",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.close_time_correct=~\"$close_time_correct\"} | select(span.close_time_vote_bins)",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\"} | select(span.close_time_vote_bins)",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
@@ -599,7 +601,7 @@
|
||||
"type": "tempo"
|
||||
},
|
||||
"queryType": "traceql",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.close_time_correct=~\"$close_time_correct\"} | select(span.close_resolution_ms)",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\"} | select(span.close_resolution_ms)",
|
||||
"refId": "B"
|
||||
}
|
||||
]
|
||||
@@ -644,7 +646,7 @@
|
||||
"type": "tempo"
|
||||
},
|
||||
"queryType": "traceql",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.close_time_correct=~\"$close_time_correct\" && span.resolution_direction=~\"$resolution_direction\"} | select(span.resolution_direction)",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.resolution_direction=~\"$resolution_direction\"} | select(span.resolution_direction)",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
@@ -690,7 +692,7 @@
|
||||
"type": "tempo"
|
||||
},
|
||||
"queryType": "traceql",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\" && span.close_time_correct=~\"$close_time_correct\"} | select(span.close_time, span.close_time_vote_bins)",
|
||||
"query": "{name=\"consensus.accept.apply\" && resource.service.instance.id=~\"$node\"} | select(span.close_time, span.close_time_vote_bins)",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user