Skip to content

Latest commit

 

History

History

minitrace-datadog

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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();