pub struct Span {
pub context: TraceContext,
pub name: String,
pub started_at: Instant,
pub ended_at: Option<Instant>,
pub status: SpanStatus,
pub events: Vec<SpanEvent>,
}Expand description
Trace span
Fields§
§context: TraceContextContext
name: StringSpan name
started_at: InstantStart timestamp
ended_at: Option<Instant>End timestamp
status: SpanStatusStatus
events: Vec<SpanEvent>Events
Implementations§
Source§impl Span
impl Span
Sourcepub fn new(context: TraceContext, name: &str) -> Self
pub fn new(context: TraceContext, name: &str) -> Self
New span
Sourcepub fn duration_ms(&self) -> u64
pub fn duration_ms(&self) -> u64
Span duration (ms)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
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