[−]Struct nakadion::instrumentation::TelemetryDriver
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.
Implementations
impl TelemetryDriver
pub fn new(
name: Option<String>,
title: Option<String>,
description: Option<String>,
processing_strategy: ProcessingStrategy,
with_driver_metrics: bool
) -> TelemetryDriver
name: Option<String>,
title: Option<String>,
description: Option<String>,
processing_strategy: ProcessingStrategy,
with_driver_metrics: bool
) -> 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 name(&self) -> Option<&str>
Gets the name of this driver
pub fn change_processing_stragtegy(&self, strategy: ProcessingStrategy)
Changes the ProcessingStrategy
pub fn pause(&self)
Pauses processing of observations.
pub fn resume(&self)
Resumes processing of observations
pub fn snapshot(&self, descriptive: bool) -> Result<Snapshot, GetSnapshotError>
Trait Implementations
impl AggregatesProcessors for TelemetryDriver
fn add_processor<P>(&mut self, processor: P) where
P: ProcessesTelemetryMessages,
P: ProcessesTelemetryMessages,
fn add_snapshooter<S>(&mut self, snapshooter: S) where
S: PutsSnapshot,
S: PutsSnapshot,
impl Clone for TelemetryDriver
fn clone(&self) -> TelemetryDriver
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for TelemetryDriver
fn default() -> TelemetryDriver
impl Descriptive for TelemetryDriver
impl ProcessesTelemetryMessages for TelemetryDriver
fn process(
&mut self,
_max: usize,
_strategy: ProcessingStrategy
) -> ProcessingOutcome
&mut self,
_max: usize,
_strategy: ProcessingStrategy
) -> ProcessingOutcome
Receive and handle pending operations
impl PutsSnapshot for TelemetryDriver
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
Auto Trait Implementations
impl RefUnwindSafe for TelemetryDriver
impl Send for TelemetryDriver
impl Sync for TelemetryDriver
impl Unpin for TelemetryDriver
impl UnwindSafe for TelemetryDriver
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,