Struct metrix::driver::TelemetryDriver [−][src]
pub struct TelemetryDriver { /* fields omitted */ }
Triggers registered ProcessesTelemetryMessages
to
poll for messages.
Runs its own background thread. The thread stops once this struct is dropped.
A TelemetryDriver
can be 'mounted' into the hierarchy.
If done so, it will still poll its children on its own thread
independently.
Optional Metrics
The driver can be configured to collect metrics on its own activities.
The metrics will be added to all snapshots
under a field named _metrix
which contains the
following fields:
-
collections_per_second
: The number of observation collection runs done per second -
collection_times_us
: A histogram of the time each observation collection took in microseconds. -
observations_processed_per_second
: The number of observations processed per second. -
observations_processed_per_collection
: A histogram of the number of observations processed during each run -
observations_dropped_per_second
: The number of observations dropped per second. See alsomax_observation_age
. -
observations_dropped_per_collection
: A histogram of the number of observations dropped during each run. See alsomax_observation_age
. -
snapshots_per_second
: The number of snapshots taken per second. -
snapshots_times_us
: A histogram of the times it took to take a snapshot in microseconds -
dropped_observations_alarm
: Will betrue
if observations have been dropped. Will by default staytrue
for 60 seconds once triggered. -
inactivity_alarm
: Will betrue
if no observations have been made for a certain amount of time. The default is 60 seconds.
Methods
impl TelemetryDriver
[src]
impl TelemetryDriver
pub fn new<T: Into<String>>(
name: Option<T>,
max_observation_age: Option<Duration>
) -> TelemetryDriver
[src]
pub fn new<T: Into<String>>(
name: Option<T>,
max_observation_age: Option<Duration>
) -> TelemetryDriver
Creates a new TelemetryDriver
.
max_observation_age
is the maximum age of an Observation
to be taken into account. This is determined by the timestamp
field of an Observation
. Observations
that are too old are simply
dropped. The default is 60 seconds.
pub fn with_default_metrics<T: Into<String>>(
name: Option<T>,
max_observation_age: Option<Duration>
) -> TelemetryDriver
[src]
pub fn with_default_metrics<T: Into<String>>(
name: Option<T>,
max_observation_age: Option<Duration>
) -> TelemetryDriver
Creates a new TelemetryDriver
which has its own metrics.
max_observation_age
is the maximum age of an Observation
to be taken into account. This is determined by the timestamp
field of an Observation
. Observations
that are too old are simply
dropped. The default is 60 seconds.
pub fn name(&self) -> Option<&str>
[src]
pub fn name(&self) -> Option<&str>
pub fn set_name<T: Into<String>>(&mut self, name: T)
[src]
pub fn set_name<T: Into<String>>(&mut self, name: T)
pub fn set_title<T: Into<String>>(&mut self, title: T)
[src]
pub fn set_title<T: Into<String>>(&mut self, title: T)
pub fn set_description<T: Into<String>>(&mut self, description: T)
[src]
pub fn set_description<T: Into<String>>(&mut self, description: T)
pub fn snapshot(&self, descriptive: bool) -> Snapshot
[src]
pub fn snapshot(&self, descriptive: bool) -> Snapshot
Trait Implementations
impl Clone for TelemetryDriver
[src]
impl Clone for TelemetryDriver
fn clone(&self) -> TelemetryDriver
[src]
fn clone(&self) -> TelemetryDriver
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl ProcessesTelemetryMessages for TelemetryDriver
[src]
impl ProcessesTelemetryMessages for TelemetryDriver
fn process(&mut self, _max: usize, _drop_deadline: Instant) -> ProcessingOutcome
[src]
fn process(&mut self, _max: usize, _drop_deadline: Instant) -> ProcessingOutcome
Receive and handle pending operations
impl PutsSnapshot for TelemetryDriver
[src]
impl PutsSnapshot for TelemetryDriver
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
[src]
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
Puts the current snapshot values into the given Snapshot
thereby following the guidelines of PutsSnapshot
. Read more
impl Default for TelemetryDriver
[src]
impl Default for TelemetryDriver
fn default() -> TelemetryDriver
[src]
fn default() -> TelemetryDriver
Returns the "default value" for a type. Read more
impl AggregatesProcessors for TelemetryDriver
[src]
impl AggregatesProcessors for TelemetryDriver
fn add_processor<P: ProcessesTelemetryMessages>(&mut self, processor: P)
[src]
fn add_processor<P: ProcessesTelemetryMessages>(&mut self, processor: P)
Add a processor.
fn add_snapshooter<S: PutsSnapshot>(&mut self, snapshooter: S)
[src]
fn add_snapshooter<S: PutsSnapshot>(&mut self, snapshooter: S)
Add a snapshooter.
impl Descriptive for TelemetryDriver
[src]
impl Descriptive for TelemetryDriver
Auto Trait Implementations
impl Send for TelemetryDriver
impl Send for TelemetryDriver
impl Sync for TelemetryDriver
impl Sync for TelemetryDriver