#[instrument] codegen does not work with async_trait async fns #399
Labels
crate/attributes
Related to the `tracing-attributes` crate
help wanted
Extra attention is needed
kind/bug
Something isn't working
Bug Report
async_trait
(as re-exported bytonic
) andinstrument
do not work as expected together. Instrumented async trait fns enter then immediately exit and drop their span, while top-level async functions work as expected.Minimal reproduction with checked-in expanded macro-generated code at https://github.com/inanna-malick/tracing-async-trait-bug-repro
This is a cross-project bug, let me know if it's best posted elsewhere.
Version
Platform
Crates
tracing-attributes, tracing-futures
Description
code output by
#[instrument]
macro for async trait functions does not use expected code gen pathway for async trait fns.for
the resulting generated code uses the expected future instrumentation pathway for
top_level
but for the async trait fn
foo
it generatesThe text was updated successfully, but these errors were encountered: