From 9725f5b48fde82f8a09e1769b930a245daf6fe07 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:56:47 +0100 Subject: [PATCH] fix(telemetry): phase-6 peer.proposal/validation.receive use ScopedSpanGuard::freshRoot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These peer-level entry spans (introduced on phase-6) used the removed SpanGuard::rootSpan(). They are scoped on the peer thread and end there, so use ScopedSpanGuard::freshRoot() — a scoped fresh trace root that does not inherit any span left active on the peer thread. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/xrpld/overlay/detail/PeerImp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xrpld/overlay/detail/PeerImp.cpp b/src/xrpld/overlay/detail/PeerImp.cpp index ec268fb570..9f4c03851b 100644 --- a/src/xrpld/overlay/detail/PeerImp.cpp +++ b/src/xrpld/overlay/detail/PeerImp.cpp @@ -1758,7 +1758,8 @@ PeerImp::onMessage(std::shared_ptr const& m) using namespace telemetry; // root: inbound peer message entry point (kConsumer); must not inherit // any span left active on this peer thread. - auto span = SpanGuard::rootSpan(TraceCategory::Peer, seg::peer, peer_span::op::proposalReceive); + auto span = + ScopedSpanGuard::freshRoot(TraceCategory::Peer, seg::peer, peer_span::op::proposalReceive); span.setAttribute(peer_span::attr::peerId, static_cast(id_)); protocol::TMProposeSet const& set = *m; @@ -2381,8 +2382,8 @@ PeerImp::onMessage(std::shared_ptr const& m) using namespace telemetry; // root: inbound peer message entry point (kConsumer); must not inherit // any span left active on this peer thread. - auto valSpan = - SpanGuard::rootSpan(TraceCategory::Peer, seg::peer, peer_span::op::validationReceive); + auto valSpan = ScopedSpanGuard::freshRoot( + TraceCategory::Peer, seg::peer, peer_span::op::validationReceive); valSpan.setAttribute(peer_span::attr::peerId, static_cast(id_)); if (m->validation().size() < 50)