Trait slog_extlog::stats::StatDefinition[][src]

pub trait StatDefinition: Debug {
    fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn stype(&self) -> StatType;
fn group_by(&self) -> Vec<&'static str>;
fn buckets(&self) -> Option<Buckets>; }

A configured statistic, defined in terms of the external logs that trigger it to change.

These definitions are provided at start of day to populate the tracker.

These should NOT be constructed directly but by using the define_stats macro.

Required Methods

The name of this metric. This name is reported in logs as the metric_name field.

A human readable-description of the statistic, describing its meaning. When logged this is the log message.

The type of statistic.

Important traits for Vec<u8>

An optional list of field names to group the statistic by.

An optional set of numerical buckets to group the statistic by.

Implementors