diff --git a/tracing-attributes/src/expand.rs b/tracing-attributes/src/expand.rs index b52cb12ab..fcdb71012 100644 --- a/tracing-attributes/src/expand.rs +++ b/tracing-attributes/src/expand.rs @@ -129,6 +129,13 @@ fn gen_block( })* }; + let follows_from = args.follows_from.iter(); + let follows_from = quote! { + #(for cause in #follows_from { + __tracing_attr_span.follows_from(cause); + })* + }; + // generate this inside a closure, so we can return early on errors. let span = (|| { // Pull out the arguments-to-be-skipped first, so we can filter results