-
Notifications
You must be signed in to change notification settings - Fork 417
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
OtlpHttpClient::Export() fails in ASYNC build #1955
Comments
Does it happen only in #1793 or is it also happen in |
Hi @marcalff I have a quick look at this problem. The problem may be all HTTP requests are canceled when we destroy the exporter(By destroying tracer provider in |
If these errors are thrown from |
In my use case, we have many modules in our system, and we expect all modules should be close immediately when got a SIGSTOP, any module should not extend the lifetime of the application. |
Ok thanks for explanation. I think it makes sense to add |
@owent - Would you like to see this issue further? |
Thank you :) |
Problem
Start a local OpenTelemetry-Collector process on port 4318.
Run the
example_otlp_http
client.In the sync build (
WITH_ASYNC_EXPORT_PREVIEW=OFF
), the client prints no error messages, and the collector gets all the trace data.The SYNC build works as expected.
Repeat in the async build (
WITH_ASYNC_EXPORT_PREVIEW=ON
)The client prints errors:
The collector gets incomplete data.
Analysis
In both cases, sync and async, the code reaches the async export method:
In the sync case:
In the async case:
and all this happens before the http server response
Export fails, printing
Session state: (manually) cancelled.
The
wait_for()
predicate:does not work for async builds.
Setting
OtlpHttpExporterOptions::max_concurrent_requests = 0
as a work around makes OtlpHttpClient::Export() to work.Not sure what the proper fix is,
max_running_requests
appear broken.The text was updated successfully, but these errors were encountered: