[][src]Struct zipkin::Tracer

pub struct Tracer(_);

The root tracing object.

Each thread has its own current span state - the Tracer should be a single global resource.

Methods

impl Tracer
[src]

pub fn builder() -> Builder
[src]

Creates a Tracer builder.

pub fn new_trace(&self) -> OpenSpan<Attached>
[src]

Starts a new trace with no parent.

pub fn new_trace_from(&self, flags: SamplingFlags) -> OpenSpan<Attached>
[src]

Starts a new trace with no parent with specific sampling flags.

pub fn join_trace(&self, context: TraceContext) -> OpenSpan<Attached>
[src]

Joins an existing trace.

The context can come from, for example, the headers of an HTTP request.

pub fn new_child(&self, parent: TraceContext) -> OpenSpan<Attached>
[src]

Starts a new span with the specified parent.

pub fn next_span(&self) -> OpenSpan<Attached>
[src]

Starts a new trace parented to the current span if one exists.

pub fn set_current(&self, context: TraceContext) -> CurrentGuard
[src]

Sets this thread's current trace context.

This method does not start a span. It is designed to be used when propagating the trace of an existing span to a new thread.

A guard object is returned which will restore the previous trace context when it falls out of scope.

pub fn current(&self) -> Option<TraceContext>
[src]

Returns this thread's current trace context.

Trait Implementations

impl Clone for Tracer
[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Tracer

impl Sync for Tracer

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