mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
fix(telemetry): assert histogram metrics by their exported names
The Telemetry Validation workflow failed with three "0 series" checks: rpc_method_us, job_queued_us and job_running_us. All three are Histograms, and the Prometheus exporter emits a histogram only as the _bucket/_count/_sum triple -- the bare instrument name is never a series, so validate_metrics() could never match it. Evidence from the failing run (31804450127): its own metric-name dump lists rpc_method_us_bucket/_count/_sum and no bare rpc_method_us, while the sibling counters recorded in the same function bodies passed with 100 and 67 series. capture_timings.py, which queries job_queued_us_bucket and job_running_us_bucket, returned real values for the acceptLedger job type in that same run. Every one of the 10 histograms present exposes the full triple, so all three suffixes are safe to assert. Name them the way the exporter does, matching what the spanmetrics group above already does for span_duration_milliseconds and what regression-metrics.json and the job-queue dashboard already query. The metrics stay in their asserted groups because they are genuinely unconditional, so `not_asserted` would be wrong.
This commit is contained in:
@@ -68,21 +68,27 @@
|
||||
"metrics": ["txq_metrics"]
|
||||
},
|
||||
"phase9_rpc_method": {
|
||||
"description": "Phase 9 per-RPC-method counters and duration histogram (MetricsRegistry.cpp:351-357). rpc_method_errored_total is deliberately absent — see not_asserted below.",
|
||||
"description": "Phase 9 per-RPC-method counters and duration histogram (MetricsRegistry.cpp:351-357). rpc_method_errored_total is deliberately absent — see not_asserted below. rpc_method_us is a Histogram, so the Prometheus exporter emits only the _bucket/_count/_sum triple and there is no bare rpc_method_us series to match — same convention as span_duration_milliseconds in the spanmetrics group above.",
|
||||
"metrics": [
|
||||
"rpc_method_started_total",
|
||||
"rpc_method_finished_total",
|
||||
"rpc_method_us"
|
||||
"rpc_method_us_bucket",
|
||||
"rpc_method_us_count",
|
||||
"rpc_method_us_sum"
|
||||
]
|
||||
},
|
||||
"phase9_job_queue": {
|
||||
"description": "Phase 9 job-queue counters and latency histograms (MetricsRegistry.cpp:360-366). Every xrpld job passes through these, so they populate under any workload.",
|
||||
"description": "Phase 9 job-queue counters and latency histograms (MetricsRegistry.cpp:360-366). Every xrpld job passes through these, so they populate under any workload. Both histograms are recorded in the same function bodies as job_started_total / job_finished_total, under the same guard and with the same labels, so their presence is equally guaranteed. They are named with the _bucket/_count/_sum suffixes the Prometheus exporter emits: regression-metrics.json and the job-queue dashboard both query job_queued_us_bucket / job_running_us_bucket, and no bare series exists.",
|
||||
"metrics": [
|
||||
"job_queued_total",
|
||||
"job_started_total",
|
||||
"job_finished_total",
|
||||
"job_queued_us",
|
||||
"job_running_us"
|
||||
"job_queued_us_bucket",
|
||||
"job_queued_us_count",
|
||||
"job_queued_us_sum",
|
||||
"job_running_us_bucket",
|
||||
"job_running_us_count",
|
||||
"job_running_us_sum"
|
||||
]
|
||||
},
|
||||
"rpc_in_flight": {
|
||||
|
||||
Reference in New Issue
Block a user