rustracing
rustracing copied to clipboard
Add `SpanSend` trait to allow custom channels, and optional support of tokio's channel.
This PR introduces SpanSend trait that allows users specifying custom channels other than the default crossbeam one.
Tokio's channel support is also added as an optional feature. You can create a tracer that uses tokio's channel as follows:
use rustracing::sampler::AllSampler;
use rustracing::Tracer;
let (span_tx, span_rx) = tokio::sync::mpsc::channel(10);
let tracer = Tracer::with_sender(AllSampler, span_tx);