-
Notifications
You must be signed in to change notification settings - Fork 446
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
Could we add worker thread pool for BatchLogProcessor
and BatchSpanProcessor
?
#1175
Comments
How is thread pool going to help here, as it still needs to wait for a response from ongoing Export() before invoking another? We can't have concurrent execution of Export() method from multiple threads(as per the specs). Also, the Export() should return with the status of export over the wire (as per the specs). I think it's important to specify the proper values for BatchSpanProcessor configuration parameters to minimize dropping logs/spans, along with optimal memory usage. Sorry if I am missing the approach suggested here, we can discuss more in that case :) |
With worker pool, we can start more http requests parallel. I mean let |
Ok thanks for explaining. Do you think its possible to do a proof of concept for logs, with some benchmark and discuss over it? If it works, we can implement it for traces too. Will assign this issue to you. |
Ok and thanks. |
I create another issue for make |
I'm a little busy recently and I may finish this several days later. |
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
andOtlpHttpLogExporter
, 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
andBatchSpanProcessor
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 bystd::async
and use the synchronous APIs of curl.Maybe we can also usecurl_multi_*
and do not wait for reponse inOtlpHttpClient::Export
to optimize the performance?This can assign to me if the solution is discussed and acceptable.
The text was updated successfully, but these errors were encountered: