opentelemetry.io icon indicating copy to clipboard operation
opentelemetry.io copied to clipboard

sdk no longer in base opentelemetry crate

Open christiangil opened this issue 1 year ago • 3 comments

What needs to be changed? If you try to run the example as is, you will get "error[E0433]: failed to resolve: could not find sdk in opentelemetry" on the lines:

use opentelemetry::sdk::trace::TracerProvider;
use opentelemetry::{global, sdk::propagation::TraceContextPropagator, trace::Tracer};

This can be fixed by replacing them with

use opentelemetry::{global, trace::Tracer};
use opentelemetry_sdk::propagation::TraceContextPropagator;
use opentelemetry_sdk::trace::TracerProvider;

and replacing the following in Cargo.toml

opentelemetry = { version = "0.21.0", features = ["trace"] }
opentelemetry-stdout = { version = "0.2.0", features = ["trace"] }

with

opentelemetry = "0.22"
opentelemetry_sdk = "0.22"
opentelemetry-stdout = { version = "0.3", features = ["trace"] }

What is the name + path of the page that needs changed? The Rust getting started page

christiangil avatar Apr 25 '24 20:04 christiangil

thanks @christiangil ! Would you be interested in raising a PR for that (note that we require contributors to sign a CLA)

cc @open-telemetry/rust-approvers

svrnm avatar Apr 26 '24 09:04 svrnm

Sure, @svrnm I could do that! Should I wait to sign the CLA before making the PR?

christiangil avatar Apr 29 '24 15:04 christiangil

Sure, @svrnm I could do that! Should I wait to sign the CLA before making the PR?

You will be asked to sign the CLA the moment you provide a PR, I am not 100% sure if you can sign it before (probably you can)

svrnm avatar Apr 29 '24 15:04 svrnm

From what I cab see, this issue has already been addressed in #4386 and followed up in #6516, so I'm closing it as complete.

If anything still needs attention, feel free to point it out 🙂

Thanks!

vitorvasc avatar Nov 21 '25 09:11 vitorvasc