Flow dropping only "HEAD" span #6375
-
Hi, I have the following tail sampling on my flow definition:
I though this above was invencible, until i started to notice following on my tempo: the reason why those traces takes a shit long time is because this endpoint "/api/something-service/enddpoint/subpath.*" is a SSE stream. by looking at the traces, it looks to me the HTTP span was correctly dropped according to the above rule, but all subsequent SSE pushed events stayed on the collector: I honestly don't know what else to do, because i cant drop all KEYS and HGETALL operations just becasue of the SSE stream. Does someone have ideas on what can I do? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Unfortunately, I think you are hitting a limitation of the tail-sampling processor: you configured the processor to wait 180s before making a decision, and once that happens, either all spans being held in memory are selected, or are dropped. From that point, if any new spans belonging to the same trace are seen, they are treated as a new trace by this processor, as we don't keep track of which traces were selected or dropped. In your case, you have spans arriving way past 180s, which explains why the root span was dropped but not the child spans. |
Beta Was this translation helpful? Give feedback.
-
for the ones facing the same, my solution was to drop this at the application layer before sending to the grafana agent. see https://github.com/vmaleze/opentelemetry-java-ignore-spans |
Beta Was this translation helpful? Give feedback.
Unfortunately, I think you are hitting a limitation of the tail-sampling processor: you configured the processor to wait 180s before making a decision, and once that happens, either all spans being held in memory are selected, or are dropped. From that point, if any new spans belonging to the same trace are seen, they are treated as a new trace by this processor, as we don't keep track of which traces were selected or dropped. In your case, you have spans arriving way past 180s, which explains why the root span was dropped but not the child spans.