Struct zipkin::trace_context::TraceContext
[−]
[src]
pub struct TraceContext { /* fields omitted */ }
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.
Methods
impl TraceContext
[src]
pub fn builder() -> Builder
[src]
Returns a builder used to construct a TraceContext
.
pub fn trace_id(&self) -> TraceId
[src]
Returns the ID of the trace associated with this context.
pub fn parent_id(&self) -> Option<SpanId>
[src]
Returns the ID of the parent of the span associated with this context.
pub fn span_id(&self) -> SpanId
[src]
Returns the ID of the span associated with this context.
pub fn sampling_flags(&self) -> SamplingFlags
[src]
Returns the sampling flags associated with this context.
pub fn sampled(&self) -> Option<bool>
[src]
Determines if sampling has been requested for this context.
A value of None
indicates that the service working in the context is
responsible for determining if it should be sampled.
pub fn debug(&self) -> bool
[src]
Determines if this context is in debug mode.
Debug contexts should always be sampled, regardless of the value of
sampled()
.
Trait Implementations
impl Copy for TraceContext
[src]
impl Clone for TraceContext
[src]
fn clone(&self) -> TraceContext
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more