From 4c8904c2c913a96342f97494e08bf90b963a210c Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:54:48 +0100 Subject: [PATCH 1/2] fix(telemetry): follow the close-time attr rename in the ledger spans phase-4 renamed the shared close_time attribute to close_time_ripple_epoch_s, naming its unit and epoch. Two consumers here still referenced the old spelling and broke the build once the rename merged forward: the re-export in LedgerSpanNames.h and the setAttribute call in BuildLedger.cpp. Both are phase-6 content, so they are fixed here rather than upstream. --- src/xrpld/app/ledger/detail/BuildLedger.cpp | 3 ++- src/xrpld/app/ledger/detail/LedgerSpanNames.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xrpld/app/ledger/detail/BuildLedger.cpp b/src/xrpld/app/ledger/detail/BuildLedger.cpp index e2433f9c1a..4e65b8e4d4 100644 --- a/src/xrpld/app/ledger/detail/BuildLedger.cpp +++ b/src/xrpld/app/ledger/detail/BuildLedger.cpp @@ -89,7 +89,8 @@ buildLedgerImpl( built->setAccepted(closeTime, closeResolution, closeTimeCorrect); buildSpan.setAttribute(ledger_span::attr::ledgerSeq, static_cast(built->header().seq)); buildSpan.setAttribute( - ledger_span::attr::closeTime, static_cast(closeTime.time_since_epoch().count())); + ledger_span::attr::closeTimeRippleEpochS, + static_cast(closeTime.time_since_epoch().count())); buildSpan.setAttribute(ledger_span::attr::closeTimeCorrect, closeTimeCorrect); buildSpan.setAttribute( ledger_span::attr::closeResolutionMs, diff --git a/src/xrpld/app/ledger/detail/LedgerSpanNames.h b/src/xrpld/app/ledger/detail/LedgerSpanNames.h index 8f6a42aed1..a1403315b4 100644 --- a/src/xrpld/app/ledger/detail/LedgerSpanNames.h +++ b/src/xrpld/app/ledger/detail/LedgerSpanNames.h @@ -34,8 +34,8 @@ namespace attr { * Canonical shared constants (defined in SpanNames.h). */ using ::xrpl::telemetry::attr::closeResolutionMs; -using ::xrpl::telemetry::attr::closeTime; using ::xrpl::telemetry::attr::closeTimeCorrect; +using ::xrpl::telemetry::attr::closeTimeRippleEpochS; using ::xrpl::telemetry::attr::ledgerHash; using ::xrpl::telemetry::attr::ledgerSeq; From 3877c4fab1ddc37a35bed795ef4dc33c3f5b0dad Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:55:03 +0100 Subject: [PATCH 2/2] fix(telemetry): rename the receive-path validation status attribute Two different facts were sharing one attribute key. The sync-diagnostics branch already emits validation_status on consensus.validation.accept, carrying what the validation store did (ValStatus: current, stale, bad_seq, multiple, conflicting, unknown) with a mapping function and tests behind it. This branch then added validation_status on consensus.validation.receive for which exit the receive path took (queued, dropped_diverged, dropped_load). One key with two value domains means any aggregation that does not also filter on span name mixes them. Merging the two branches also produced a duplicate constexpr declaration in one header, which is how the compiler surfaced it. The established accept-path key keeps its name; this one becomes validation_receive_status, qualified by the span phase it describes. The values are unchanged. --- include/xrpl/consensus/ConsensusSpanNames.h | 18 ++++++++++++------ src/xrpld/overlay/detail/PeerImp.cpp | 8 ++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/xrpl/consensus/ConsensusSpanNames.h b/include/xrpl/consensus/ConsensusSpanNames.h index f71b332457..e337fa56c6 100644 --- a/include/xrpl/consensus/ConsensusSpanNames.h +++ b/include/xrpl/consensus/ConsensusSpanNames.h @@ -289,12 +289,18 @@ inline constexpr auto proposalTrusted = makeStr("proposal_trusted"); inline constexpr auto validationTrusted = makeStr("validation_trusted"); /** - * "validation_status" — which exit the inbound validation took. Set once per - * exit, so a dropped validation (microseconds) is separable from a queued one - * (job wait plus checkValidation). Without it the span name reports two - * unrelated latency distributions and every quantile over it is meaningless. + * "validation_receive_status" — which exit the inbound validation took on + * consensus.validation.receive. Set once per exit, so a dropped validation + * (microseconds) is separable from a queued one (job wait plus + * checkValidation); without it the span reports two unrelated latency + * distributions and every quantile over it is meaningless. + * + * Deliberately NOT `validation_status`: that key belongs to + * consensus.validation.accept and carries what the validation store did + * (`ValStatus`). One key with two value domains would make any aggregation + * that does not also filter on span name meaningless. */ -inline constexpr auto validationStatus = makeStr("validation_status"); +inline constexpr auto validationReceiveStatus = makeStr("validation_receive_status"); } // namespace attr // ===== Event names =========================================================== @@ -360,7 +366,7 @@ inline constexpr auto closeAnomaly = makeStr("anomaly"); inline constexpr auto closeOthersClosed = makeStr("others_closed"); inline constexpr auto closeIdle = makeStr("idle"); inline constexpr auto closeNormal = makeStr("normal"); -// validation_status values, one per exit of the inbound validation path. +// validation_receive_status values, one per exit of the receive path. inline constexpr auto validationQueued = makeStr("queued"); inline constexpr auto validationDroppedDiverged = makeStr("dropped_diverged"); inline constexpr auto validationDroppedLoad = makeStr("dropped_load"); diff --git a/src/xrpld/overlay/detail/PeerImp.cpp b/src/xrpld/overlay/detail/PeerImp.cpp index cfc921d63e..4085290b62 100644 --- a/src/xrpld/overlay/detail/PeerImp.cpp +++ b/src/xrpld/overlay/detail/PeerImp.cpp @@ -2671,7 +2671,7 @@ PeerImp::onMessage(std::shared_ptr const& m) static_cast(val->getSignTime().time_since_epoch().count())); } - // validation_status is set once on each exit below, not as a default + // validation_receive_status is set once on each exit below, not as a default // here, to avoid OTel SDK attribute duplication. It is what separates // the microsecond drop paths from the queued path, which also covers // job wait and checkValidation. @@ -2680,7 +2680,7 @@ PeerImp::onMessage(std::shared_ptr const& m) if (span && *span) { span->setAttribute( - telemetry::consensus::span::attr::validationStatus, + telemetry::consensus::span::attr::validationReceiveStatus, telemetry::consensus::span::val::validationDroppedDiverged); } JLOG(pJournal_.debug()) << "Dropping untrusted validation from diverged peer"; @@ -2691,7 +2691,7 @@ PeerImp::onMessage(std::shared_ptr const& m) if (span && *span) { span->setAttribute( - telemetry::consensus::span::attr::validationStatus, + telemetry::consensus::span::attr::validationReceiveStatus, telemetry::consensus::span::val::validationQueued); } std::string const name = isTrusted ? "ChkTrust" : "ChkUntrust"; @@ -2710,7 +2710,7 @@ PeerImp::onMessage(std::shared_ptr const& m) if (span && *span) { span->setAttribute( - telemetry::consensus::span::attr::validationStatus, + telemetry::consensus::span::attr::validationReceiveStatus, telemetry::consensus::span::val::validationDroppedLoad); } JLOG(pJournal_.debug()) << "Dropping untrusted validation for load";