diff --git a/Cargo.toml b/Cargo.toml index b99e1eb..b41c0c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,4 @@ repository = "https://github.com/thoren-d/tracing-chrome" [dependencies] json = "0.12.4" tracing = "0.1.21" -tracing-subscriber = "0.2.15" +tracing-subscriber = "0.3.1" diff --git a/src/lib.rs b/src/lib.rs index e8a8cad..520db9a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -418,7 +418,8 @@ where } fn get_root_id(span: SpanRef) -> u64 { - span.from_root() + span.scope() + .from_root() .take(1) .next() .unwrap_or(span) @@ -488,7 +489,7 @@ where self.exit_span(ctx.span(id).expect("Span not found."), ts); } - fn new_span(&self, attrs: &span::Attributes<'_>, id: &span::Id, ctx: Context<'_, S>) { + fn on_new_span(&self, attrs: &span::Attributes<'_>, id: &span::Id, ctx: Context<'_, S>) { let ts = self.get_ts(); if self.include_args { let mut args = Object::new();