-
Notifications
You must be signed in to change notification settings - Fork 466
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
[Bug]: OpenTelemetry log error occurred. cannot send message to batch processor as the channel is closed #1660
Comments
The batch log processor has a background task that exporting the logs. When it's being After this operation, every attempt to emit logs will result in such error. |
I am seeing this too. Is it safe not to call |
so if we have this error, it means that the tracer provider has not been shutdown correctly before the application stopped? I have this error even when I call |
on my side, I realized that this error occurred after cloning the pipeline provider with something like: let provider = otlp_pipeline
.install_batch(opentelemetry_sdk::runtime::Tokio)
.expect("Failed to build OTLP pipeline")
.provider()
.clone(); and then running |
I have the same issue and it does not matter if it's cloned or I do everything in the same scope. It spams these errors no matter if I call shutdown on everything or not. |
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: