Files
rippled/docker/telemetry
Pratik Mankawde b0cea67aed fix(telemetry): address final-review + CI clang-tidy findings
CI's clang-tidy leg flagged eight include-cleaner errors and three
misc-const-correctness / readability-convert-member-functions-to-static /
modernize-use-designated-initializers issues, all inside WP-B6's own code.
Fixed as follows:

- `MetricsRegistry.h`: `#include <opentelemetry/metrics/observer_result.h>`
  for ObserverResult; `observeCacheLockHoldPeaks` is now `static` because it
  touches neither instance state nor telemetry members.
- `SHAMapStoreImp.h`: adds direct includes for `<cstddef>`, `<string_view>`
  and `<xrpl/telemetry/SpanNames.h>` (the StaticStr provider). `seconds` in
  `RotationPhase::~RotationPhase` is `[[maybe_unused]]` so a
  `-DXRPL_ENABLE_TELEMETRY=0` build under `-Werror` keeps compiling.
- `SHAMapStoreImp.cpp`: direct includes for `SHAMapStoreSpanNames.h`,
  `SpanGuard.h`, `SpanNames.h`; `RotationPhase` locals that never call
  `setAttribute` are declared `const`; `RotationOutcome` uses designated
  initialisers.

Final-review findings (WP-B6-rotation-stall-tracing.md, "What to check
when reviewing"):

- Panels 74 and 75 on `ledger-sync-health.json` still carried panel 41's
  description, axisLabel, Source and Keywords copy; rewritten to describe
  rotation phase duration and cache lock hold respectively.
- `consensus_view_change_total` and the `view.change` round-span event
  were emitted but not registered with the harness. Added the counter to
  `not_asserted.metrics_excluded` (workload-gated) and annotated the
  `consensus.round` span note with the event and its two attribute keys.

Not fixed (parked, see progress ledger):
- The reviewer's second Important finding — a plan/code contradiction on
  the consensus counter — was based on a misread of the plan; the plan's
  "Rejected alternatives" table lists a new `TraceCategory::Nodestore` and
  the getKeys() fix, not the consensus counter. No action.
- The Minor note about `sweep()`'s peak including lock-acquire time and
  `getKeys()`'s not: `sweep()` acquires and releases the lock via a
  `scoped_lock`, so `noteLockHold` still runs after the release and the
  numbers are comparable. No action.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-09-14 21:23:28 +01:00
..