Skip to content

Could we add worker thread pool for BatchLogProcessor and BatchSpanProcessor? #1175

Description

@owent

Is your feature request related to a problem?

In some system , we have a lot of logs to commit in one batch and it takes a long time to receive the response.(via BatchLogProcessor and OtlpHttpLogExporter, it takes about 100-200ms to get the http response).The worker thread cost only about 10% of CPU time but it will drop logs because the circular buffer is full when waiting for response of previous http request.

Describe the solution you'd like

I thinkg maybe it can be solved by adding worker pool to BatchLogProcessor and BatchSpanProcessor or use asynchronous IO APIs of gRPC or HTTP client.I think it's easier to implement a worker pool.

Describe alternatives you've considered

Now, HttpOperation::SendAsync spawn a new thread by std::async and use the synchronous APIs of curl.Maybe we can also use curl_multi_* and do not wait for reponse in OtlpHttpClient::Export to optimize the performance?

This can assign to me if the solution is discussed and acceptable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions