Skip to content

Commit

Permalink
fix(layer/minitrace): fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Jul 29, 2023
1 parent d09a72e commit a3a6d09
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
41 changes: 41 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ uuid = { version = "1", features = ["serde", "v4"] }
criterion = { version = "0.4", features = ["async", "async_tokio"] }
dotenvy = "0.15"
libtest-mimic = "0.6"
minitrace = { version = "0.5", features = ["enable"] }
minitrace-jaeger = "0.5"
opentelemetry = { version = "0.19", default-features = false, features = [
"trace",
] }
Expand Down
4 changes: 2 additions & 2 deletions core/src/layers/minitrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ use crate::*;
/// runtime.block_on(
/// async {
/// let _ = dotenvy::dotenv();
/// let op = Operator::from_env::<services::Memory>()
/// let op = Operator::new(services::Memory::default())
/// .expect("init operator must succeed")
/// .layer(MinitraceLayer)
/// .finish();
Expand Down Expand Up @@ -109,7 +109,7 @@ use crate::*;
/// let reporter =
/// minitrace_jaeger::JaegerReporter::new("127.0.0.1:6831".parse().unwrap(), "opendal")
/// .unwrap();
/// minitrace::set_reporter(reporter, Config::default());
/// minitrace::set_reporter(reporter, minitrace::collector::Config::default());
/// ```
///
/// For real-world usage, please take a look at [`minitrace-datadog`](https://crates.io/crates/minitrace-datadog) or [`minitrace-jaeger`](https://crates.io/crates/minitrace-jaeger) .
Expand Down

0 comments on commit a3a6d09

Please sign in to comment.