Datadog reporter for minitrace
.
[dependencies]
minitrace = "0.6"
minitrace-datadog = "0.6"
Please follow the Datadog official documentation.
cargo run --example synchronous
use std::net::SocketAddr;
use minitrace::collector::Config;
use minitrace::prelude::*;
// Initialize reporter
let reporter = minitrace_datadog::DatadogReporter::new(
"127.0.0.1:8126".parse().unwrap(),
"asynchronous",
"db",
"select",
);
minitrace::set_reporter(reporter, Config::default());
{
// Start tracing
let root = Span::root("root", SpanContext::random());
}
minitrace::flush();