Struct zipkin::Tracer
[−]
[src]
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]
fn builder() -> Builder
[src]
Creates a Tracer
builder.
fn new_trace(&self, name: &str) -> OpenSpan
[src]
Starts a new trace with no parent.
fn join_trace(&self, name: &str, context: TraceContext) -> OpenSpan
[src]
Joins an existing trace.
The context can come from, for example, the headers of an HTTP request.
fn new_child(&self, name: &str, parent: TraceContext) -> OpenSpan
[src]
Starts a new span with the specified parent.
fn next_span(&self, name: &str) -> OpenSpan
[src]
Starts a new trace parented to the current span if one exists.
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.
fn current(&self) -> Option<TraceContext>
[src]
Returns this thread's current trace context.