1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//! Metric and log exporters. pub mod prometheus; pub mod stdout; use crate::metrics::registry::{MetricKind, MetricSnapshot}; /// Trait for exporting collected metrics. pub trait Exporter: Send + Sync { /// Export a batch of metric snapshots. fn export_metrics( &self, metrics: &[(&str, &str, MetricKind, MetricSnapshot)], ) -> std::io::Result<()>; }