Trait slog_extlog::stats::StatDefinition
source · pub trait StatDefinition: Debug {
// Required methods
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>;
}
Expand description
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§
sourcefn name(&self) -> &'static str
fn name(&self) -> &'static str
The name of this metric. This name is reported in logs as the metric_name
field.
sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
A human readable-description of the statistic, describing its meaning. When logged this is the log message.