minitrace-datadog

Crates.iominitrace-datadog
lib.rsminitrace-datadog
version0.6.7
sourcesrc
created_at2022-01-14 18:20:10.538311
updated_at2024-06-23 09:28:26.928159
descriptionDatadog reporter for minitrace-rust
homepagehttps://github.com/tikv/minitrace-rust
repositoryhttps://github.com/tikv/minitrace-rust
max_upload_size
id513982
size18,008
Andy Lok (andylokandy)

documentation

https://docs.rs/minitrace-datadog

README

minitrace-datadog

Documentation Crates.io LICENSE

Datadog reporter for minitrace.

Dependencies

[dependencies]
minitrace = "0.6"
minitrace-datadog = "0.6"

Setup Datadog Agent

Please follow the Datadog official documentation.

cargo run --example synchronous

Report to Datadog Agent

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();
Commit count: 180

cargo fmt