Description
With tracing at 100% (#9154), the OpenTelemetry SDK's batch span processor can't keep up on a fast topology: in my runs it exported 5–11% of the spans and dropped the rest, and tuning it raised that only to 13%. It drops spans whatever the outcome, so failures and timeouts go too.
@GGraziadei suggested sending the spans down a Storm stream to a collector bolt that keeps failures, timeouts and a sample of the rest. The bolt would also need to know when the work for a tuple ends in an async bolt; otherwise it can't tell where a timed-out tuple stopped.
Open questions: what the bolt holds and for how long, what it does under overload, and whether reducing near each worker beats one central bolt. I'd prototype it first and measure it against OTLP.
What do you think?
Activity
reiabreu commentedon Oct 17, 2026
This comment was generated with the help of an LLM (Claude).
Notes on #9155, after reading #9154 at
59f06daf3.Why failures are lost today. The sampler decides when the spout emits (
OpenTelemetryTupleTracer.spoutEmit), before anyone knows if the tuple will fail. At a 1% ratio, about 99% of later failures are never traced. At 100%, the span queue overflows and drops spans whatever the outcome.What a fix needs. Hold a trace's spans until its outcome is known. Then keep every failed or timed-out trace and a small share of the successful ones.
Suggestion: a reporter bolt, with several instances grouped by trace id.
spoutOutcome.Gaps in the current API
TupleTracerhas no output collector, so it can't emit tuples.execute()returns, so it can't show where a timed-out tuple stopped.I'd prototype it, as dpol1 suggested, and compare it with the exporter numbers in #9154.
dpol1 commentedon Oct 19, 2026
Thanks for the notes, @reiabreu. Agreed on grouping the reporter bolt by trace id. Collector tail sampling only sees what the SDK's queue lets through, so the first step is getting spans out of the Java agent into Storm. I'll post what I find here.
dpol1 commentedon Oct 26, 2026
In a prototype with Java agent 2.31.1 and one worker in a LocalCluster, an agent extension fed ended spans to a Storm spout with their trace, span and parent IDs intact. Transporting and exporting the records also generated spans, feeding them back into the queue; a filter stopped the loop in this setup but let through the export endpoint's server spans, whose parents are remote.
flowchart LR T["user topology"] -->|"spans"| X["agent extension (SpanProcessor)"] X -->|"byte[] per span"| Q[("bounded queue in System.getProperties()")] Q --> S["spout"] --> B["bolt"] -->|"POST batches"| E["local /export endpoint"] S -.->|"emit spans, filtered"| X B -.->|"execute and HTTP client spans, filtered"| X E -.->|"server spans, not filtered"| XThe queue handoff through
System.getProperties()is provisional, and supervisor-launched workers, multiple workers and overhead remain untested. Next I'd define what workers send to the reporter bolt. @rzo1 @reiabreu e @GGraziadei sound reasonable?Drafted with AI assistance; findings checked against local prototype runs.
reiabreu commentedon Nov 26, 2026
@dpol1 I'll try to review this in short order
dpol1 commentedon Nov 26, 2026
Thanks @reiabreu, I've paused that _ no rush here; see #9302