-
Notifications
You must be signed in to change notification settings - Fork 467
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
SimpleExporter is not useable with OTLP/Http #2189
Comments
Just to be clear - it doesn't work with reqwest client (both blocking and async) ? |
"reqwest-blocking-client" works fine in this case. (only as long as it is not called from a tokio managed thread) |
Also to add, async-compat crate under use async_compat::{Compat, CompatExt};
futures_executor::block_on(Compat::new((exporter.export(LogBatch::new(log_tuple))))) This is as documented here - https://docs.rs/async-compat/latest/async_compat/#
As per the docs, this adapter internally creates the tokio runtime if not already running, and then allows using types and traits from the futures crate in this tokio runtime.
Have tested this with OTLP + reqwest and it works. Will validate if it works for tonic and hyper. |
Planning to close the issue with the following:
Don't think we need to modify SimpleExporter to spin up its own thread and make this work more easily.... |
Moving back to thread-based approach as earlier - /~https://github.com/open-telemetry/opentelemetry-rust/blob/v0.20.0/opentelemetry-sdk/src/logs/log_processor.rs#L49 - will work for with reqwest-blocking for both main as tokio and non-tokio context? |
For SimpleProcessor users, they can enable feature "reqwest", and it should work. Listing the working options for SimpleProcessor customers below. There is one working gRPC and HTTP client option each. Given this, do we need to go back to background thread creation in Simple case? Works: SimpleExporter |
SimpleExporter is not useable with OTLP/HTTP (Reqwest client and Hyper client both fails), as export just hangs forever.
Minimal repro when using Reqwest
Minimal repro when using Hyper
The text was updated successfully, but these errors were encountered: