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

fn name(&self) -> &'static str[src]

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

fn description(&self) -> &'static str[src]

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

fn stype(&self) -> StatType[src]

The type of statistic.

fn group_by(&self) -> Vec<&'static str>[src]

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

fn buckets(&self) -> Option<Buckets>[src]

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

Loading content...

Implementors

Loading content...