Struct telemetry::plain::Count
[−]
[src]
pub struct Count { // some fields omitted }
Count histograms.
A Count histogram simply accumulates the numbers passed with
record()
. Count histograms are useful, for instance, to know how
many times a feature has been used, or how many times an error has
been triggered.
With SerializationFormat::SimpleJson
, these histograms are
serialized as a plain number.
Methods
impl Count
fn new(service: &Service, name: String) -> Count
Create a new Count histogram with a given name.
Argument name
is used as key when processing and exporting
the data. Each name
must be unique to the Service
.
Panics
If name
is already used by another histogram in service
.