pub struct SpanInfo {
pub name: String,
pub target: String,
pub level: String,
}Expand description
Span metadata exposed as a dcontext value.
When DcontextLayer is configured with
include_span_info(),
this type is automatically set in the context on span enter.
§Example
ⓘ
use dcontext_tracing::SpanInfo;
let info: SpanInfo = dcontext::get_context("dcontext.span");
println!("current span: {} ({})", info.name, info.target);Fields§
§name: StringThe span’s name (from #[instrument] or tracing::span!).
target: StringThe span’s target (usually the module path).
level: StringThe span’s level as a string (“TRACE”, “DEBUG”, “INFO”, “WARN”, “ERROR”).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SpanInfo
impl<'de> Deserialize<'de> for SpanInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SpanInfo
impl RefUnwindSafe for SpanInfo
impl Send for SpanInfo
impl Sync for SpanInfo
impl Unpin for SpanInfo
impl UnsafeUnpin for SpanInfo
impl UnwindSafe for SpanInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more