Struct rustracing::Tracer[][src]

pub struct Tracer<S, T> { /* fields omitted */ }

Tracer.

Examples

use rustracing::Tracer;
use rustracing::sampler::AllSampler;

let (tracer, span_rx) = Tracer::new(AllSampler);
{
   let _span = tracer.span("foo").start_with_state(());
}
let span = span_rx.try_recv().unwrap();
assert_eq!(span.operation_name(), "foo");

Methods

impl<S: Sampler<T>, T> Tracer<S, T>
[src]

Makes a new Tracer instance.

Returns StartSpanOptions for starting a span which has the name operation_name.

impl<S, T> Tracer<S, T>
[src]

Clone with the given sampler.

Trait Implementations

impl<S: Debug, T: Debug> Debug for Tracer<S, T>
[src]

Formats the value using the given formatter. Read more

impl<S, T> Clone for Tracer<S, T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<S, T> Send for Tracer<S, T> where
    S: Send + Sync,
    T: Send

impl<S, T> !Sync for Tracer<S, T>