You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have debug_span! and debug_event! macros in the tokio-trace-macros crate which are only enabled in debug mode builds.
We can detect debug mode with
#[cfg(debug_assertions)]
In debug mode, these macros would behave identically to the tokio_trace crate's span! and debug! macros. In release mode (i.e. #[cfg(not(debug_assertions))]) the debug_span! macro would always evaluate to a disabled span struct (Span::new_disabled()) while debug_event! would do nothing.
The text was updated successfully, but these errors were encountered:
See also tokio-rs/tokio#827 (review).
It would be nice to have
debug_span!
anddebug_event!
macros in thetokio-trace-macros
crate which are only enabled in debug mode builds.We can detect debug mode with
#[cfg(debug_assertions)]
In debug mode, these macros would behave identically to the
tokio_trace
crate'sspan!
anddebug!
macros. In release mode (i.e.#[cfg(not(debug_assertions))]
) thedebug_span!
macro would always evaluate to a disabled span struct (Span::new_disabled()
) whiledebug_event!
would do nothing.The text was updated successfully, but these errors were encountered: