pub struct AggregateMetricTelemetry { /* private fields */ }
Expand description

Aggregated metric telemetry item that represents an aggregation of data points over time. There values can be calculated by the caller or with add_data or add_sampled_data method.

Examples

use appinsights::telemetry::{Telemetry, AggregateMetricTelemetry};

// create a telemetry item
let mut telemetry = AggregateMetricTelemetry::new("temp_sensor");
telemetry.stats_mut().add_data(&[50.0, 53.1, 56.4]);

// assign custom properties and context tags
telemetry.properties_mut().insert("component".to_string(), "external_device".to_string());
telemetry.tags_mut().insert("os_version".to_string(), "linux x86_64".to_string());

// submit telemetry item to server
client.track(telemetry);

Implementations

Creates a metric telemetry item with specified name and value.

Returns aggregated metric to submit with the telemetry item.

Returns mutable reference to aggregated metric.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the time when this telemetry was measured.

Returns custom properties to submit with the telemetry item.

Returns mutable reference to custom properties.

Returns context data containing extra, optional tags. Overrides values found on client telemetry context.

Returns mutable reference to custom tags.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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