mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-28 09:30:34 +00:00
fix(telemetry): root peer.validation.receive and peer.proposal.receive spans
These inbound peer-message entry points (kConsumer) used span(), which inherits whatever span is active on the peer thread — including a leaked tx.receive scope — so validations/proposals were wrongly nested under unrelated transaction traces. rootSpan() starts a fresh trace root. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1750,7 +1750,9 @@ void
|
||||
PeerImp::onMessage(std::shared_ptr<protocol::TMProposeSet> const& m)
|
||||
{
|
||||
using namespace telemetry;
|
||||
auto span = SpanGuard::span(TraceCategory::Peer, seg::peer, peer_span::op::proposalReceive);
|
||||
// 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);
|
||||
span.setAttribute(peer_span::attr::peerId, static_cast<int64_t>(id_));
|
||||
|
||||
protocol::TMProposeSet const& set = *m;
|
||||
@@ -2367,8 +2369,10 @@ void
|
||||
PeerImp::onMessage(std::shared_ptr<protocol::TMValidation> 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::span(TraceCategory::Peer, seg::peer, peer_span::op::validationReceive);
|
||||
SpanGuard::rootSpan(TraceCategory::Peer, seg::peer, peer_span::op::validationReceive);
|
||||
valSpan.setAttribute(peer_span::attr::peerId, static_cast<int64_t>(id_));
|
||||
|
||||
if (m->validation().size() < 50)
|
||||
|
||||
Reference in New Issue
Block a user