You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Tokio shuts down, I receive a lot of errors about a channel being closed:
This happens whether or not I attempt to shutdown (unset) the trace/log providers.
Here is a brief explanation as code:
#[tokio::main]asyncfnmain(){// initialise tracing/logging here
opentelemetry::global::shutdown_tracer_provider();
opentelemetry::global::shutdown_logger_provider();// Without this sleep, I get a different error:// OpenTelemetry log error occurred. Exporter otlp encountered the following errors: the grpc server returns error (Unknown error): , detailed error message: transport error
tokio::time::sleep(Duration::from_secs(2)).await;// errors are printed at this point.}
The batch log processor has a background task that exporting the logs. When it's being droped the receiver in the background task will gets dropped too.
After this operation, every attempt to emit logs will result in such error.
What happened?
When Tokio shuts down, I receive a lot of errors about a channel being closed:
This happens whether or not I attempt to shutdown (unset) the trace/log providers.
Here is a brief explanation as code:
For a full (hopefully) reproducable version of the code and dependencies, see: https://gist.github.com/NickLarsenNZ/fbbb477230e9992e9a4aa2603edcf54f
I initially raised it in the #otel-rust Slack channel: https://cloud-native.slack.com/archives/C03GDP0H023/p1712590806651679
API Version
0.22.0
SDK Version
0.22.1
What Exporters are you seeing the problem on?
OTLP
Relevant log output
The text was updated successfully, but these errors were encountered: