open-telemetry / opentelemetry.io

The OpenTelemetry website and documentation
https://opentelemetry.io
Creative Commons Attribution 4.0 International
542 stars 1.2k forks source link

sdk no longer in base opentelemetry crate #4365

Open christiangil opened 6 months ago

christiangil commented 6 months ago

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

svrnm commented 6 months ago

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

christiangil commented 6 months ago

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

svrnm commented 6 months ago

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)