pub trait DatabaseMetrics {
// Provided methods
fn report_metrics(&self) { ... }
fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)> { ... }
fn counter_metrics(&self) -> Vec<(&'static str, u64, Vec<Label>)> { ... }
fn histogram_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)> { ... }
}
Expand description
Represents a type that can report metrics, used mainly with the database. The report_metrics
method can be used as a prometheus hook.
Provided Methods§
Sourcefn report_metrics(&self)
fn report_metrics(&self)
Reports metrics for the database.
Sourcefn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>
fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>
Returns a list of Gauge metrics for the database.