diff --git a/include/xrpl/telemetry/SpanNames.h b/include/xrpl/telemetry/SpanNames.h index 951947ac34..732bc0c41c 100644 --- a/include/xrpl/telemetry/SpanNames.h +++ b/include/xrpl/telemetry/SpanNames.h @@ -125,7 +125,13 @@ inline constexpr auto ledgerSeq = makeStr("ledger_seq"); inline constexpr auto closeTime = makeStr("close_time"); inline constexpr auto closeTimeCorrect = makeStr("close_time_correct"); inline constexpr auto closeResolutionMs = makeStr("close_resolution_ms"); -inline constexpr auto ledgerHash = join(join(seg::xrpl, seg::ledger), makeStr("hash")); +/// Shared validation attrs — reused by the consensus and peer validation +/// spans. Same concept, same key on every span; the span name tells them +/// apart, so neither is emitter-prefixed. `ledgerHash` is a ledger-object +/// property (bare, like ledgerSeq); `fullValidation` is the is-full-validation +/// flag. Never the dotted xrpl. form (reserved for resource attrs). +inline constexpr auto ledgerHash = makeStr("ledger_hash"); +inline constexpr auto fullValidation = makeStr("full_validation"); } // namespace attr // ===== Shared attribute values ============================================= diff --git a/src/xrpld/overlay/detail/PeerImp.cpp b/src/xrpld/overlay/detail/PeerImp.cpp index 18372f3557..e58e97ea65 100644 --- a/src/xrpld/overlay/detail/PeerImp.cpp +++ b/src/xrpld/overlay/detail/PeerImp.cpp @@ -2413,7 +2413,7 @@ PeerImp::onMessage(std::shared_ptr const& m) val->setSeen(closeTime); } valSpan.setAttribute(peer_span::attr::ledgerHash, to_string(val->getLedgerHash()).c_str()); - valSpan.setAttribute(peer_span::attr::validationFull, val->isFull()); + valSpan.setAttribute(peer_span::attr::fullValidation, val->isFull()); if (!isCurrent( app_.getValidations().parms(), diff --git a/src/xrpld/overlay/detail/PeerSpanNames.h b/src/xrpld/overlay/detail/PeerSpanNames.h index fd2081f778..3e6530c486 100644 --- a/src/xrpld/overlay/detail/PeerSpanNames.h +++ b/src/xrpld/overlay/detail/PeerSpanNames.h @@ -25,13 +25,15 @@ inline constexpr auto validationReceive = makeStr("validation.receive"); // ===== Attribute keys ======================================================== namespace attr { -/// Canonical shared constants (defined in SpanNames.h). +/// Canonical shared constants (defined in SpanNames.h). `ledgerHash` and +/// `fullValidation` are shared with the consensus validation spans — same +/// concept, same key, told apart by span name. +using ::xrpl::telemetry::attr::fullValidation; using ::xrpl::telemetry::attr::ledgerHash; using ::xrpl::telemetry::attr::peerId; -/// Domain-owned bare attrs. +/// Trust flag qualified by message type, shared with consensus.*.receive. inline constexpr auto proposalTrusted = makeStr("proposal_trusted"); -inline constexpr auto validationFull = makeStr("validation_full"); inline constexpr auto validationTrusted = makeStr("validation_trusted"); } // namespace attr