pub struct OtelData { /* private fields */ }
Expand description
Per-span OpenTelemetry data tracked by this crate.
Implementations§
Source§impl OtelData
impl OtelData
Sourcepub fn trace_id(&self) -> Option<TraceId>
pub fn trace_id(&self) -> Option<TraceId>
Gets the trace ID of the span.
Returns None
if the context has not been built yet. This can be forced e.g. by calling
context
on the span (not on OtelData
) or if context activation was not explicitly
opted-out of, simply entering the span for the first time.
Sourcepub fn span_id(&self) -> Option<SpanId>
pub fn span_id(&self) -> Option<SpanId>
Gets the span ID of the span.
Returns None
if the context has not been built yet. This can be forced e.g. by calling
context
on the span (not on OtelData
) or if context activation was not explicitly
opted-out of, simply entering the span for the first time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OtelData
impl !RefUnwindSafe for OtelData
impl Send for OtelData
impl Sync for OtelData
impl Unpin for OtelData
impl !UnwindSafe for OtelData
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