mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-21 03:12:29 +00:00
Add span discard mechanism that drops unwanted spans before they enter the batch export queue, saving both network bandwidth and storage. FilteringSpanProcessor is a custom SpanProcessor decorator that wraps BatchSpanProcessor. SpanGuard::discard() sets a thread-local flag (tl_discardCurrentSpan) before calling Span::End(). The OTel SDK calls OnEnd() synchronously on the same thread, where the flag is checked and cleared to drop the span. New file: DiscardFlag.h — zero-dependency header for the thread-local flag, avoiding transitive include bloat from Telemetry.h. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>