Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Jan 8, 2025
1 parent 3df0b84 commit 806d7d1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 37 deletions.
45 changes: 17 additions & 28 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,14 @@ libtest-mimic = "0.8"
opentelemetry = { version = "0.27", default-features = false, features = [
"trace",
] }
opentelemetry-otlp = "0.26"
opentelemetry_sdk = "0.26"
opentelemetry-otlp = "0.27"
opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] }
pretty_assertions = "1"
rand = "0.8"
sha2 = "0.10"
size = "0.4"
tokio = { version = "1.27", features = ["fs", "macros", "rt-multi-thread"] }
tracing-opentelemetry = "0.27.0"
tracing-opentelemetry = "0.28.0"
tracing-subscriber = { version = "0.3", features = [
"env-filter",
"tracing-log",
Expand Down
11 changes: 5 additions & 6 deletions core/src/layers/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ use crate::*;
///
/// # fn main() -> Result<()> {
/// use opentelemetry::trace::TracerProvider;
/// let tracer_provider = opentelemetry_otlp::new_pipeline()
/// .tracing()
/// .with_exporter(opentelemetry_otlp::new_exporter().tonic())
/// .with_trace_config(trace::Config::default().with_resource(Resource::new(vec![
/// let tracer_provider = opentelemetry_sdk::trace::TracerProvider::builder()
/// .with_simple_exporter(opentelemetry_otlp::SpanExporter::builder().with_tonic().build()?)
/// .with_resource(Resource::new(vec![
/// KeyValue::new("service.name", "opendal_example"),
/// ])))
/// .install_simple()?;
/// ]))
/// .build();
/// let tracer = tracer_provider.tracer("opendal_tracer");
/// let opentelemetry = tracing_opentelemetry::layer().with_tracer(tracer);
///
Expand Down

0 comments on commit 806d7d1

Please sign in to comment.