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 also max_observation_age.

  • observations_dropped_per_collection: A histogram of the number of observations dropped during each run. See also max_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 be true if observations have been dropped. Will by default stay true for 60 seconds once triggered.

  • inactivity_alarm: Will be true if no observations have been made for a certain amount of time. The default is 60 seconds.

Implementations

impl TelemetryDriver[src]

pub fn new(
    name: Option<String>,
    title: Option<String>,
    description: Option<String>,
    processing_strategy: ProcessingStrategy,
    with_driver_metrics: bool
) -> TelemetryDriver
[src]

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 name(&self) -> Option<&str>[src]

Gets the name of this driver

pub fn change_processing_stragtegy(&self, strategy: ProcessingStrategy)[src]

Changes the ProcessingStrategy

pub fn pause(&self)[src]

Pauses processing of observations.

pub fn resume(&self)[src]

Resumes processing of observations

pub fn snapshot(&self, descriptive: bool) -> Result<Snapshot, GetSnapshotError>[src]

pub fn snapshot_async(
    &self,
    descriptive: bool
) -> impl Future<Output = Result<Snapshot, GetSnapshotError>> + Send + 'static
[src]

Trait Implementations

impl AggregatesProcessors for TelemetryDriver[src]

impl Clone for TelemetryDriver[src]

impl Default for TelemetryDriver[src]

impl Descriptive for TelemetryDriver[src]

impl ProcessesTelemetryMessages for TelemetryDriver[src]

fn process(
    &mut self,
    _max: usize,
    _strategy: ProcessingStrategy
) -> ProcessingOutcome
[src]

Receive and handle pending operations

impl PutsSnapshot for TelemetryDriver[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,