macro_rules! event {
($level:ident, $($arg:tt)+) => {
#[cfg(feature = "tracing")]
{
::tracing::$level!(target: "rpc_io", $($arg)+);
}
};
}
macro_rules! call_span {
($kind:literal, $method:expr, $id:expr) => {
#[cfg(feature = "tracing")]
let _span = ::tracing::debug_span!(
target: "rpc_io",
$kind,
method = ?$crate::error_object::clip(&$method),
id = $id.map(|id| ::tracing::field::debug($crate::error_object::clip(&id.to_string()).into_owned())),
)
.entered();
};
}
pub(crate) use {call_span, event};