fastrace-datadog

Crates.iofastrace-datadog
lib.rsfastrace-datadog
version0.7.4
sourcesrc
created_at2024-07-16 10:04:10.42678
updated_at2024-10-27 17:20:39.62848
descriptionDatadog reporter for fastrace
homepage
repositoryhttps://github.com/fast/fastrace
max_upload_size
id1304901
size17,915
tison (tisonkun)

documentation

https://docs.rs/fastrace-datadog

README

fastrace-datadog

Documentation Crates.io LICENSE

Datadog reporter for fastrace.

Dependencies

[dependencies]
fastrace = "0.7"
fastrace-datadog = "0.7"

Setup Datadog Agent

Please follow the Datadog official documentation.

cargo run --example synchronous

Report to Datadog Agent

use std::net::SocketAddr;

use fastrace::collector::Config;
use fastrace::prelude::*;

// Initialize reporter
let reporter = fastrace_datadog::DatadogReporter::new(
    "127.0.0.1:8126".parse().unwrap(),
    "asynchronous",
    "db",
    "select",
);
fastrace::set_reporter(reporter, Config::default());

{
    // Start tracing
    let root = Span::root("root", SpanContext::random());
}

fastrace::flush();
Commit count: 215

cargo fmt