use feldera_storage::histogram::ExponentialHistogramSnapshot;
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub enum ValueType {
Counter,
Gauge,
}
impl ValueType {
pub fn as_str(&self) -> &'static str {
match self {
ValueType::Counter => "counter",
ValueType::Gauge => "gauge",
}
}
}
pub struct ConnectorHistogram {
pub name: &'static str,
pub help: &'static str,
pub snapshot: ExponentialHistogramSnapshot,
}
pub trait ConnectorMetrics: Send + Sync {
fn metrics(&self) -> Vec<(&'static str, &'static str, ValueType, f64)>;
fn histograms(&self) -> Vec<ConnectorHistogram> {
Vec::new()
}
}