mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 07:30:30 +00:00
Resolve the doCommand error-path span suffix and command attribute against the handler registry instead of using raw request input. A recognized command yields its canonical handler name; anything else (unregistered command, or neither command/method present) collapses to the literal "unknown". This bounds telemetry cardinality to the finite set of handler names plus "unknown" while preserving per-command error attribution for known-but-rejected commands (e.g. a submit that hit rpcTOO_BUSY stays rpc.command.submit). The command attribute is promoted to a Prometheus label by the spanmetrics connector, so attacker-controlled input previously enabled unbounded label cardinality. Also add the missing LCOV_EXCL_STOP in the first SpanGuard::linkedSpan overload so its coverage exclusion no longer bleeds into the second overload's guards. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>