abdolence / opentelemetry-gcloud-trace-rs

OpenTelemetry support for Google Cloud Trace for Rust
Apache License 2.0
8 stars 3 forks source link

Running Example Doesn't Work: there is no reactor running #20

Closed wspeirs closed 1 year ago

wspeirs commented 1 year ago

If you run the example as described in the README, you get the following error:

thread 'opentelemetry-exporter' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /home/wspeirs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/client/connect/dns.rs:121:24
abdolence commented 1 year ago

Hey, thanks for the report. This is definitely some conflict between external deps, since it was working without issues before. Let me check what was changed.

abdolence commented 1 year ago

Ok, I found out that install_simple() doesn't work anymore when Tokio runtime is inside. Some external dep behaviour was changed.

However good news is that install_simple() shouldn't be used in prod code anyway, so I simulated somehow simple with batch exporter where I can propagate the Tokio runtime specifically.

This is the fix: https://github.com/abdolence/opentelemetry-gcloud-trace-rs/pull/21

abdolence commented 1 year ago

Fixed (well workarounded the external limitation) in https://github.com/abdolence/opentelemetry-gcloud-trace-rs/releases/tag/v0.6.1

Let me know if it doesn't work for you.

wspeirs commented 1 year ago

Just tested, and it works for me... thanks!!!