Struct rustracing_jaeger::Tracer
source · pub struct Tracer { /* private fields */ }
Expand description
Tracer.
Implementations§
source§impl Tracer
impl Tracer
sourcepub fn new<S>(sampler: S) -> (Self, SpanReceiver)where
S: Sampler<SpanContextState> + Send + Sync + 'static,
pub fn new<S>(sampler: S) -> (Self, SpanReceiver)where
S: Sampler<SpanContextState> + Send + Sync + 'static,
Makes a new Tracer
instance with an unbounded channel.
This constructor is mainly for backward compatibility, it has the same interface
as in previous versions except the type of SpanReceiver
.
It builds an unbounded channel which may cause memory issues if there is no reader,
prefer with_sender()
alternative with a bounded one.
sourcepub fn with_sender<S>(sampler: S, span_tx: SpanSender) -> Selfwhere
S: Sampler<SpanContextState> + Send + Sync + 'static,
pub fn with_sender<S>(sampler: S, span_tx: SpanSender) -> Selfwhere
S: Sampler<SpanContextState> + Send + Sync + 'static,
Makes a new Tracer
instance.
sourcepub fn clone_with_sampler<T>(&self, sampler: T) -> Selfwhere
T: Sampler<SpanContextState> + Send + Sync + 'static,
pub fn clone_with_sampler<T>(&self, sampler: T) -> Selfwhere
T: Sampler<SpanContextState> + Send + Sync + 'static,
Clone with the given sampler
.