#opentracing #jaeger

rustracing_jaeger

Jaeger client library created on top of rustracing

23 releases

0.6.1 Feb 11, 2021
0.6.0 Oct 25, 2020
0.5.0 Aug 10, 2020
0.4.1 Mar 30, 2020
0.1.3 Oct 30, 2017

#7 in Profiling

Download history 2474/week @ 2021-04-09 2428/week @ 2021-04-16 2163/week @ 2021-04-23 2628/week @ 2021-04-30 1978/week @ 2021-05-07 2228/week @ 2021-05-14 1721/week @ 2021-05-21 2127/week @ 2021-05-28 2254/week @ 2021-06-04 2423/week @ 2021-06-11 2291/week @ 2021-06-18 2273/week @ 2021-06-25 2840/week @ 2021-07-02 2354/week @ 2021-07-09 1974/week @ 2021-07-16 1435/week @ 2021-07-23

9,496 downloads per month
Used in 19 crates (6 directly)

MIT license

78KB
956 lines

rustracing_jaeger

Crates.io: rustracing_jaeger Documentation Actions Status Coverage Status License: MIT

Jaeger client library created on top of rustracing.

Documentation

Examples

Basic Usage

use rustracing::sampler::AllSampler;
use rustracing_jaeger::Tracer;
use rustracing_jaeger::reporter::JaegerCompactReporter;

// Creates a tracer
let (span_tx, span_rx) = crossbeam_channel::bounded(10);
let tracer = Tracer::with_sender(AllSampler, span_tx);
{
    let span = tracer.span("sample_op").start();
    // Do something

} // The dropped span will be sent to `span_rx`

let span = span_rx.try_recv().unwrap();
assert_eq!(span.operation_name(), "sample_op");

// Reports this span to the local jaeger agent
let reporter = JaegerCompactReporter::new("sample_service").unwrap();
reporter.report(&[span]).unwrap();

Executes report.rs example

# Run jaeger in background
$ docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest

# Report example spans
$ cargo run --example report

# View spans (see the image below)
$ firefox http://localhost:16686/

Jaeger UI

References

Dependencies

~1.1–1.6MB
~35K SLoC