Trait reth_db::database_metrics::DatabaseMetrics

source ·
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§

source

fn report_metrics(&self)

Reports metrics for the database.

source

fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>

Returns a list of Gauge metrics for the database.

source

fn counter_metrics(&self) -> Vec<(&'static str, u64, Vec<Label>)>

Returns a list of Counter metrics for the database.

source

fn histogram_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>

Returns a list of Histogram metrics for the database.

Implementations on Foreign Types§

source§

impl<DB> DatabaseMetrics for Arc<DB>
where DB: DatabaseMetrics,

Implementors§

source§

impl DatabaseMetrics for DatabaseEnv

Available on crate feature mdbx only.
source§

impl<DB: DatabaseMetrics> DatabaseMetrics for TempDatabase<DB>

Available on crate feature test-utils only.