diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e35cb1a..0d039e8 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2781,6 +2781,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "sample" version = "0.1.0" +dependencies = [ + "tracing", +] [[package]] name = "schannel" diff --git a/rust/sample/Cargo.toml b/rust/sample/Cargo.toml index 6a69dce..1d85561 100644 --- a/rust/sample/Cargo.toml +++ b/rust/sample/Cargo.toml @@ -11,3 +11,6 @@ publish = { workspace = true } repository = { workspace = true } rust-version = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +tracing = { workspace = true } diff --git a/rust/sample/src/lib.rs b/rust/sample/src/lib.rs index 4c7965d..ef8df23 100644 --- a/rust/sample/src/lib.rs +++ b/rust/sample/src/lib.rs @@ -10,9 +10,10 @@ use std::{ /// /// `SampleRate` determines how often the sampled statement will occur. /// -/// ```ignore -/// use sample::{SampleRate, Sampling}; +/// ``` +/// use sample::{sample, SampleRate, Sampling}; /// use std::time::Duration; +/// use tracing::info; /// /// // Sampled based on frequency of events, log only every 2 logs /// sample!(SampleRate::Frequency(2), info!("Long log"));