Skip to content

sdk/log: Redesign BatchProcessor #6797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pellared opened this issue May 20, 2025 · 1 comment
Open

sdk/log: Redesign BatchProcessor #6797

pellared opened this issue May 20, 2025 · 1 comment
Assignees
Labels
area:logs Part of OpenTelemetry logs pkg:SDK Related to an SDK package

Comments

@pellared
Copy link
Member

pellared commented May 20, 2025

Maybe the goroutine responsible for actually exporting the log records should be also responsible for getting/dequeuing the log records from the queue instead of doing it here?

My idea was that here we only signal that we want to have the exporter goroutine (processRecordsBatches) to try to export. The exporter goroutine could dequeue by itself. I do not think we need a sync.Pool for batches as we have only one exporting goroutine.

The idea is also to get rid of something like len(b.recordsBatches) == cap(b.recordsBatches) (or len(e.input) != cap(e.input)) which looks like a code smell.

Currently, the "poll goroutine" can consume almost a whole CPU thread when there is "big traffic" and bufferExporter.Ready returns false over and over (which results in no-op for loop) .

Originally posted by @pellared in #6673 (comment)

@pellared pellared self-assigned this May 20, 2025
@pellared pellared added pkg:SDK Related to an SDK package area:logs Part of OpenTelemetry logs labels May 20, 2025
@pellared
Copy link
Member Author

Created for tracking and assigning myself as "sponsor".

@wmdanor, feel free to continue working on it if you are interested.
However, giving my laconic description and unclear outcome, I totally understand if you do not want to abandon it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs pkg:SDK Related to an SDK package
Projects
Status: No status
Development

No branches or pull requests

1 participant