Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
Pratik Mankawde
2026-05-28 18:28:15 +01:00
parent c070177800
commit a35003b123
2 changed files with 4 additions and 5 deletions

View File

@@ -66,14 +66,9 @@
#include <xrpl/telemetry/SpanGuard.h>
#include <xrpl/telemetry/SpanNames.h>
#include <xrpl/telemetry/Telemetry.h>
#include <xrpl/telemetry/TraceContextPropagator.h> // IWYU pragma: keep
#include <boost/smart_ptr/intrusive_ptr.hpp>
#ifdef XRPL_ENABLE_TELEMETRY
#include <opentelemetry/context/runtime_context.h>
#endif
#include <xrpl.pb.h>
#include <algorithm>

View File

@@ -700,6 +700,10 @@ Consensus<Adaptor>::startRoundInternal(
CLOG(clog) << "startRoundInternal transitioned to ConsensusPhase::open, "
"previous ledgerID: "
<< prevLedgerID << ", seq: " << prevLedger.seq() << ". ";
// Reset establishSpan_ so a wrongLedger recovery mid-establish doesn't
// leak the prior round's span into the new one (startEstablishTracing
// early-returns when establishSpan_ is populated).
establishSpan_.reset();
openSpan_.emplace(
telemetry::SpanGuard::span(
telemetry::TraceCategory::Consensus,