mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-23 15:10:34 +00:00
detached() strips the thread-local OTel Scope so a guard can be safely moved to and destroyed on another thread; it pops the Scope on the origin thread and moves the span into a scope-less guard. rootSpan() starts a span as a fresh trace root (kIsRootSpanKey) so inbound entry points never inherit an ambient span left active on the thread. Impl now holds an optional<Scope> (nullopt for detached guards). Updated the SpanGuard class docs and docs/build/telemetry.md with the cross-thread rules. The unit test lands on phase2 where the telemetry test module exists. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>