Struct nakadion::publisher::TelemetryDriver [−][src]
pub struct TelemetryDriver { /* fields omitted */ }
Expand description
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
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.
Changes the ProcessingStrategy
pub fn snapshot_async(
&self,
descriptive: bool
) -> impl Future<Output = Result<Snapshot, GetSnapshotError>> + Send + 'static
Trait Implementations
Add a processor.
Add a snapshooter.
Returns the “default value” for a type. Read more
Receive and handle pending operations
Puts the current snapshot values into the given Snapshot
thereby
following the guidelines of PutsSnapshot
. Read more
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
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more