summaryrefslogtreecommitdiffstats
path: root/tokio-trace/examples/counters.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-trace/examples/counters.rs')
-rw-r--r--tokio-trace/examples/counters.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokio-trace/examples/counters.rs b/tokio-trace/examples/counters.rs
index 4c5b3583..dad02bb8 100644
--- a/tokio-trace/examples/counters.rs
+++ b/tokio-trace/examples/counters.rs
@@ -125,7 +125,7 @@ fn main() {
tokio_trace::subscriber::with_default(subscriber, || {
let mut foo: u64 = 2;
- span!(Level::TRACE, "my_great_span", foo_count = &foo).enter(|| {
+ span!(Level::TRACE, "my_great_span", foo_count = &foo).in_scope(|| {
foo += 1;
info!({ yak_shaved = true, yak_count = 1 }, "hi from inside my span");
span!(
@@ -134,7 +134,7 @@ fn main() {
foo_count = &foo,
baz_count = 5
)
- .enter(|| {
+ .in_scope(|| {
warn!({ yak_shaved = false, yak_count = -1 }, "failed to shave yak");
});
});