reiabreu commented on issue #9155:
URL: https://github.com/apache/storm/issues/9155#issuecomment-6238214540

   *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.**
   - Workers send their spans to it, plus an outcome event from `spoutOutcome`.
   - All spans of one trace reach the same instance, so it sees the whole trace 
and decides once.
   - It holds only traces still waiting for an outcome, and drops successes as 
soon as they are acked, except the sample.
   - It needs a size limit that drops successes first and counts what it drops. 
It also needs a timeout for traces that never get an outcome.
   
   **Gaps in the current API**
   - A `TupleTracer` has no output collector, so it can't emit tuples.
   - The reporter has to export spans with the ids they carry, which the 
OpenTelemetry API can't do. It would use OTLP or the SDK's exporter interface 
instead.
   - Without ackers there is no outcome.
   - An async bolt's execute span ends when `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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to