Crates.io | minitrace-jaeger |
lib.rs | minitrace-jaeger |
version | 0.6.7 |
source | src |
created_at | 2022-01-14 18:19:22.634973 |
updated_at | 2024-06-23 09:28:13.559924 |
description | Jaeger reporter for minitrace-rust |
homepage | https://github.com/tikv/minitrace-rust |
repository | https://github.com/tikv/minitrace-rust |
max_upload_size | |
id | 513981 |
size | 25,589 |
Jaeger reporter for minitrace
.
[dependencies]
minitrace = "0.6"
minitrace-jaeger = "0.6"
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/
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();