Struct zipkin::TraceContext
source · pub struct TraceContext { /* private fields */ }
Expand description
A TraceContext
represents a distributed trace request.
It consists of a trace ID, the ID of the parent span, the ID of the context’s span, and flags dealing with the sampling of the span.
The trace context is sent to remote services on requests. For example, it is included in a standard set of headers in HTTP requests.
Implementations§
source§impl TraceContext
impl TraceContext
sourcepub fn parent_id(&self) -> Option<SpanId>
pub fn parent_id(&self) -> Option<SpanId>
Returns the ID of the parent of the span associated with this context.
sourcepub fn sampling_flags(&self) -> SamplingFlags
pub fn sampling_flags(&self) -> SamplingFlags
Returns the sampling flags associated with this context.
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<TraceContext> for Builder
impl From<TraceContext> for Builder
source§fn from(c: TraceContext) -> Builder
fn from(c: TraceContext) -> Builder
Converts to this type from the input type.