Struct opentracingrust::Tracer [] [src]

pub struct Tracer { /* fields omitted */ }

The library users interface to tracing.

This structure is the focus point for clients to use in combination with SpanContext. The configured tracer is stored in this structure and backs the available methods.

The Tracer structure also provides some utility methods to make common operations easier.

Methods

impl Tracer
[src]

[src]

Creates a new Tracer for a concrete tracer.

impl Tracer
[src]

[src]

Attempt to extract a SpanContext from a carrier.

If the carrier (i.e, HTTP Request, RPC Message, ...) includes tracing information this method returns Ok(Some(context)), otherwise Ok(None) is returned.

If the method fails to extract a context because the carrier fails or because the tracing information is incorrectly formatted an Error is returned.

[src]

Inject tracing information into a carrier.

If the method fails to inject the context because the carrier fails.

[src]

Create a new Span with the given operation name and default starting options.

[src]

Create a new Span with the given operation name and starting options.