open-telemetry / opentelemetry-rust-contrib

OpenTelemetry Contrib Packages for Rust
Apache License 2.0
28 stars 26 forks source link

[Bug]: Sample code broken #79

Open gvasquez95 opened 1 month ago

gvasquez95 commented 1 month ago

What happened?

Quickstart code yields the following error messages:

error[E0277]: the trait bound `XrayPropagator: TextMapPropagator` is not satisfied
  --> src/main.rs:38:37
   |
38 |     global::set_text_map_propagator(XrayPropagator::default());
   |     ------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TextMapPropagator` is not implemented for `XrayPropagator`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `TextMapPropagator`:
             TextMapCompositePropagator
             NoopTextMapPropagator
             BaggagePropagator
             TraceContextPropagator
note: required by a bound in `set_text_map_propagator`
  --> /Users/xxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opentelemetry-0.23.0/src/global/propagation.rs:15:35
   |
15 | pub fn set_text_map_propagator<P: TextMapPropagator + Send + Sync + 'static>(propagator: P) {
   |                                   ^^^^^^^^^^^^^^^^^ required by this bound in `set_text_map_propagator`

Using these versions in Cargo.toml:

opentelemetry = "0.23.0"
opentelemetry-aws = "0.10.0"
opentelemetry-otlp = "0.16.0"
opentelemetry_sdk = "0.23.0"

API Version

0.23.0

SDK Version

0.23.0

What component are you working with?

No response

Relevant log output

No response

cijothomas commented 1 month ago

Most likely, incompat version issue! Would you be interesting in trying and fixing the same?