Trait metrix::TransmitsTelemetryData[][src]

pub trait TransmitsTelemetryData<L> {
    fn transmit(&self, observation: Observation<L>) -> &Self;
fn add_handler(&self, handler: Box<HandlesObservations<Label = L>>) -> &Self;
fn add_cockpit(&self, cockpit: Cockpit<L>) -> &Self;
fn add_panel_to_cockpit(
        &self,
        cockpit_name: String,
        panel: Panel<L>
    ) -> &Self; fn observed(&self, label: L, count: u64, timestamp: Instant) -> &Self { ... }
fn observed_one(&self, label: L, timestamp: Instant) -> &Self { ... }
fn observed_one_value(
        &self,
        label: L,
        value: u64,
        timestamp: Instant
    ) -> &Self { ... }
fn observed_duration(
        &self,
        label: L,
        duration: Duration,
        timestamp: Instant
    ) -> &Self { ... }
fn observed_now(&self, label: L, count: u64) -> &Self { ... }
fn observed_one_now(&self, label: L) -> &Self { ... }
fn observed_one_value_now(&self, label: L, value: u64) -> &Self { ... }
fn observed_one_duration_now(&self, label: L, duration: Duration) -> &Self { ... }
fn measure_time(&self, label: L, from: Instant) -> &Self { ... } }

Transmits telemetry data to the backend.

Implementors should tranfer Observations to a backend and manipulate the instruments there to not to interfere to much with the actual task being measured/observed

Required Methods

Transit an observation to the backend.

Add a handler.

Add a Copckpit

Add a Panel to a Cockpit if that Cockpit has the given name.

Provided Methods

Observed count occurences at time timestamp

Convinience method. Simply calls transmit

Observed one occurence at time timestamp

Convinience method. Simply calls transmit

Observed one occurence with value value at time timestamp

Convinience method. Simply calls transmit

Sends a Duration as an observed value observed at timestamp. The Duration is converted to nanoseconds.

Observed count occurences at now.

Convinience method. Simply calls observed with the current timestamp.

Observed one occurence now

Convinience method. Simply calls observed_one with the current timestamp.

Observed one occurence with value value now

Convinience method. Simply calls observed_one_value with the current timestamp.

Sends a Duration as an observed value observed with the current timestamp.

The Duration is converted to nanoseconds.

Measures the time from from until now.

The resultiong duration is an observed value with the measured duration in nanoseconds.

Implementors