Crates.io | metrics-datadog-exporter |
lib.rs | metrics-datadog-exporter |
version | 0.1.14 |
source | src |
created_at | 2021-05-19 17:01:55.289613 |
updated_at | 2023-11-20 21:05:13.61745 |
description | A `metrics` compatible exporter that sends metrics to DataDog |
homepage | |
repository | https://github.com/sevco/metrics-datadog-exporter-rs |
max_upload_size | |
id | 399665 |
size | 102,150 |
#[tokio::main]
async fn main() {
let exporter = DataDogBuilder::default()
.tags(vec![
"tag1".to_string(),
"val1".to_string()
])
.build()
.install()
.unwrap();
exporter.flush.await()?;
}
#[tokio::main]
async fn main() {
let exporter = DataDogBuilder::default()
.write_to_stdout(false)
.write_to_api(true, Some("DD_API_KEY".to_string()))
.tags(vec![
"tag1".to_string(),
"val1".to_string()
])
.build()
.install()
.unwrap();
exporter.flush.await()?;
}
#[tokio::main]
async fn main() {
let exporter = DataDogBuilder::default()
.write_to_stdout(false)
.write_to_api(true, Some("DD_API_KEY".to_string()))
.tags(vec![
"tag1".to_string(),
"val1".to_string()
])
.build()
.install()
.unwrap();
let (_exporter, _scheduled) = exporter.schedule(Duration::from_secs(10));
}