14 releases
0.6.7 | Jun 23, 2024 |
---|---|
0.6.4 | Feb 8, 2024 |
0.6.2 | Nov 2, 2023 |
0.5.0 | Jul 28, 2023 |
0.4.0 | Jan 26, 2022 |
#885 in Debugging
3,060 downloads per month
185KB
4K
SLoC
minitrace-jaeger
Jaeger reporter for minitrace
.
Dependencies
[dependencies]
minitrace = "0.6"
minitrace-jaeger = "0.6"
Setup Jaeger Agent
docker run --rm -d -p6831:6831/udp -p14268:14268 -p16686:16686 --name jaeger jaegertracing/all-in-one:latest
cargo run --example synchronous
Web UI is available on http://127.0.0.1:16686/
Report to Jaeger Agent
use std::net::SocketAddr;
use minitrace::collector::Config;
use minitrace::prelude::*;
// Initialize reporter
let reporter =
minitrace_jaeger::JaegerReporter::new("127.0.0.1:6831".parse().unwrap(), "asynchronous")
.unwrap();
minitrace::set_reporter(reporter, Config::default());
{
// Start tracing
let root = Span::root("root", SpanContext::random());
}
minitrace::flush();
Dependencies
~2.5–7.5MB
~64K SLoC