refactor(telemetry): use activateIfLive helper at ledger.acquire site

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-07-23 14:09:18 +01:00
parent d66e0c7fc2
commit 18eab81628

View File

@@ -459,8 +459,7 @@ InboundLedger::done()
// activation pops at the end of this block (restoring the prior context)
// while acquireSpan_ is still alive, then reset() ends the span.
{
auto acquireActivation = (acquireSpan_ && *acquireSpan_) ? acquireSpan_->activate()
: telemetry::ScopedActivation{};
auto acquireActivation = telemetry::activateIfLive(acquireSpan_);
if (acquireSpan_ && *acquireSpan_)
{
using namespace telemetry;