Struct opentelemetry::logs::TraceContext
source · pub struct TraceContext {
pub trace_id: TraceId,
pub span_id: SpanId,
pub trace_flags: Option<TraceFlags>,
}
Available on crate feature
logs
only.Expand description
TraceContext stores the trace data for logs that have an associated span.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.trace_id: TraceId
Trace id
span_id: SpanId
Span Id
trace_flags: Option<TraceFlags>
Trace flags
Trait Implementations§
source§impl Clone for TraceContext
impl Clone for TraceContext
source§fn clone(&self) -> TraceContext
fn clone(&self) -> TraceContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TraceContext
impl Debug for TraceContext
source§impl From<&SpanContext> for TraceContext
impl From<&SpanContext> for TraceContext
source§fn from(span_context: &SpanContext) -> TraceContext
fn from(span_context: &SpanContext) -> TraceContext
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for TraceContext
impl Send for TraceContext
impl Sync for TraceContext
impl Unpin for TraceContext
impl UnwindSafe for TraceContext
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