Crates.io | fastrace-datadog |
lib.rs | fastrace-datadog |
version | 0.7.9 |
source | src |
created_at | 2024-07-16 10:04:10.42678+00 |
updated_at | 2025-03-25 17:29:36.767557+00 |
description | Datadog reporter for fastrace |
homepage | |
repository | https://github.com/fast/fastrace |
max_upload_size | |
id | 1304901 |
size | 17,862 |
Datadog reporter for fastrace
.
[dependencies]
fastrace = "0.7"
fastrace-datadog = "0.7"
Please follow the Datadog official documentation.
cargo run --example synchronous
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();