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 0bce9a252c..06e1715a84 100644 --- a/src/xrpld/overlay/detail/PeerImp.cpp +++ b/src/xrpld/overlay/detail/PeerImp.cpp @@ -2706,7 +2706,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. @@ -2715,7 +2715,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"; @@ -2726,7 +2726,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"; @@ -2745,7 +2745,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";