Crates.io | minitrace-datadog |
lib.rs | minitrace-datadog |
version | 0.6.7 |
source | src |
created_at | 2022-01-14 18:20:10.538311 |
updated_at | 2024-06-23 09:28:26.928159 |
description | Datadog reporter for minitrace-rust |
homepage | https://github.com/tikv/minitrace-rust |
repository | https://github.com/tikv/minitrace-rust |
max_upload_size | |
id | 513982 |
size | 18,008 |
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();