rustic_rs/metrics.rs
1use anyhow::Result;
2
3pub enum MetricValue {
4 Int(u64),
5 Float(f64),
6}
7
8pub struct Metric {
9 pub name: &'static str,
10 pub description: &'static str,
11 pub value: MetricValue,
12}
13
14pub trait MetricsExporter {
15 fn push_metrics(&self, metrics: &[Metric]) -> Result<()>;
16}
17
18#[cfg(feature = "prometheus")]
19pub mod prometheus;
20
21#[cfg(feature = "opentelemetry")]
22pub mod opentelemetry;