Skip to content

Conversation

@sfleen
Copy link
Collaborator

@sfleen sfleen commented Sep 26, 2025

Our trace span exporter uses batching logic to avoid making excessive requests to the trace collector. It does this by either waiting for the batch buffer to hit a maximum number of spans (currently 1000), or waiting for no spans to be collected in some timeout window (currently 10s).

If a workload emits spans at a slow but consistent rate, say 1 span/s, it would cause the timeout window to never be hit while the buffer slowly fills. At this rate, it would cause spans to not be emitted for a long time.

This replaces the timeout window with an interval timer that attempts to send the currently buffered spans on a consistent interval, regardless of if the collector has sat idle. This interval is set to 10s to match the current idle timeout, but this can be tuned in the future along with the buffer size if we feel the need.

Our trace span exporter uses batching logic to avoid making excessive requests to the trace collector. It does this by either waiting for the batch buffer to hit a maximum number of spans (currently 1000), or waiting for no spans to be collected in some timeout window (currently 10s).

If a workload emits spans at a slow but consistent rate, say 1 span/s, it would cause the timeout window to never be hit while the buffer slowly fills. At this rate, it would cause spans to not be emitted for a long time.

This replaces the timeout window with an interval timer that attempts to send the currently buffered spans on a consistent interval, regardless of if the collector has sat idle. This interval is set to 10s to match the current idle timeout, but this can be tuned in the future along with the buffer size if we feel the need.

Signed-off-by: Scott Fleener <[email protected]>
@sfleen sfleen requested a review from a team as a code owner September 26, 2025 16:33
@sfleen sfleen merged commit 3f33f59 into main Sep 26, 2025
15 checks passed
@sfleen sfleen deleted the sfleen/tracing-timeout branch September 26, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants