rustracing icon indicating copy to clipboard operation
rustracing copied to clipboard

Add `SpanSend` trait to allow custom channels, and optional support of tokio's channel.

Open sile opened this issue 6 years ago • 0 comments

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);

sile avatar Mar 29 '20 14:03 sile