Crate telemetry [−] [src]
Telemetry is a mechanism used to capture metrics in an application, to later store the data locally or upload it to a server for statistical analysis.
Examples of usage:
- capturing the speed of an operation;
- finding out if users are actually using a feature;
- finding out how the duration of a session;
- determine the operating system on which the application is executed;
- determining the configuration of the application;
- capturing the operations that slow down the application;
- determining the amount of I/O performed by the application;
- ...
To make use of Telemetry, an application needs:
- an instance of
telemetry::Service
, designed to hold all the state in a dedicated thread and export it as needed; - one or more instances of
telemetry::Feature
, designed allow activating or deactivating a group of histograms together; - one or more instances of either
single::Histogram
orkeyed::KeyedHistogram
, designed to actually record the data.
Memory note: the memory used by a histogram is recollected only
when its instance of telemetry
is garbage-collected. In other
words, if a histogram goes out of scope for some reason, its data
remains in telemetry and will be stored and/or uploaded in
accordance with the configuration of this telemetry instance.
See Mozilla Telemetry Server for an open-source implementation of a server implementing the Telemetry protocol.
Reexports
pub use keyed::KeyedHistogram; |
pub use plain::Histogram; |
Modules
keyed |
Definition of keyed (aka "dynamic family of") histograms. |
plain |
Definition of histograms. |
Structs
Service |
Enums
SerializationFormat |
A subformat of Json to use for serialization. |
Traits
Flatten |
A value that can be represented as a u32. |
Type Definitions
Version |
A software version, e.g. [2015, 10, 10, 0]. |