pub struct SpanGuard { /* private fields */ }Expand description
RAII guard for an in-flight span; finalizes and records the span on drop.
Implementations§
Source§impl SpanGuard
impl SpanGuard
Sourcepub fn context(&self) -> &SpanContext
pub fn context(&self) -> &SpanContext
Borrowed span context (trace, span, and parent ids).
Sourcepub fn set_attribute(&mut self, key: &str, value: Value)
pub fn set_attribute(&mut self, key: &str, value: Value)
Attach a key/value attribute to the span.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SpanGuard
impl !UnwindSafe for SpanGuard
impl Freeze for SpanGuard
impl Send for SpanGuard
impl Sync for SpanGuard
impl Unpin for SpanGuard
impl UnsafeUnpin for SpanGuard
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