Skip to content
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

Async BatchExportProcessor #5778

Open
verdie-g opened this issue Aug 8, 2024 · 1 comment
Open

Async BatchExportProcessor #5778

verdie-g opened this issue Aug 8, 2024 · 1 comment
Labels
enhancement New feature or request pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Comments

@verdie-g
Copy link

verdie-g commented Aug 8, 2024

Package

OpenTelemetry

Is your feature request related to a problem?

BatchExportProcessor is unnecessarily spawning a thread for the export. This thread spends 99% of its time blocked. This is a little waste of resource and it can also mislead investigations about thread pool starvation (a blocked thread looks like an issue until you find out it's not a thread pool thread).

What is the expected behavior?

The export spends its time waiting for a trigger or for the response of the export operation. It is completely fine using the .NET thread pool as long as all operations are asynchronous. This would make OTEL a better citizen in the .NET ecosystem.

The work would be:

Which alternative solutions or features have you considered?

N/A

Additional context

No response

@verdie-g verdie-g added the enhancement New feature or request label Aug 8, 2024
@github-actions github-actions bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Aug 8, 2024
@cijothomas
Copy link
Member

In common scenario when all signals are enabled, 3 threads are created by OTel - BatchExportProcessor for Traces.
BatchExportProcessor for Logs, PeriodicReader for Metrics, each creates own thread that sits idle for 99% of the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants