Files
rippled/docker
Pratik Mankawde b0b02a5b10 fix(telemetry): repair broken acquire-outcome query and stat-panel legends
Three defects, all found by rendering the panels and running their queries
against a live mainnet node.

1. Ledger Acquire Phase Outcomes had an invalid PromQL escape.
   The saved JSON held "ledger\\.acquire\\.(.*)", which decodes to
   `ledger\.acquire\.(.*)`. In a PromQL double-quoted string `\.` is not a
   legal escape, so Prometheus rejected the whole query:
     parse error: unknown escape sequence U+002E '.'
   The panel therefore rendered an error badge and "No data". A PromQL string
   needs two characters, so the JSON must carry four backslashes.

2. The same panel never grouped by outcome, despite its title.
   `sum by (span_name, timed_out, ...)` omitted `outcome`, so complete and
   abandoned collapsed into one line. Measured at 16:45 UTC that hid a 29x
   difference: astree complete=2085 against abandoned=71, all drawn as a
   single indistinguishable series -- and every phase then showed the same
   0.2596/s value, which is what made the panel look meaningless.
   Now grouped by outcome, giving four real series (verified live):
     header complete 0.1439/s, header abandoned 0.0772/s,
     astree abandoned 0.1404/s, txtree abandoned 0.1404/s
   The selector moves from timed_out (always "false" here, so it carried no
   information and its filter var was redundant) to the declared
   $span_outcome. Legend becomes "<phase> <outcome>"; axis label reads
   "Phases / sec" to match the ops unit.

3. Seven stat panels and one heatmap dumped the raw label set as the legend.
   With no fieldConfig.defaults.displayName but textMode "value_and_name",
   Grafana has no name to show and falls back to printing every label:
     {deployment_environment="local", exported_instance="xrpld-mainnet",
      exported_job="xrpld", instance="otel-collector:8889", ...}
   Rendered PNGs of panels 10 and 26 confirmed it. Fixed on ids 10, 12, 13,
   14, 26, 36, 45 and 52 with the board convention already used by 24 sibling
   stat panels: "${__field.labels.series} ${__field.labels.xrpl_ident}".

Verified afterwards by executing all 66 panel queries on this board against
live Prometheus: 0 parse errors, 56 returning data. The 10 empty ones are
counters a healthy node never increments plus panel 29, which is gated to stay
blank until a ledger is validated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 21:23:46 +01:00
..