[][src]Struct zipkin::trace_context::TraceContext

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 From<TraceContext> for Builder
[src]

impl Eq for TraceContext
[src]

impl Copy for TraceContext
[src]

impl Clone for TraceContext
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<TraceContext> for TraceContext
[src]

impl Debug for TraceContext
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any