Struct appinsights::telemetry::AggregateMetricTelemetry
source · [−]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
Trait Implementations
sourceimpl Debug for AggregateMetricTelemetry
impl Debug for AggregateMetricTelemetry
sourceimpl Telemetry for AggregateMetricTelemetry
impl Telemetry for AggregateMetricTelemetry
sourcefn properties(&self) -> &Properties
fn properties(&self) -> &Properties
Returns custom properties to submit with the telemetry item.
sourcefn properties_mut(&mut self) -> &mut Properties
fn properties_mut(&mut self) -> &mut Properties
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
impl RefUnwindSafe for AggregateMetricTelemetry
impl Send for AggregateMetricTelemetry
impl Sync for AggregateMetricTelemetry
impl Unpin for AggregateMetricTelemetry
impl UnwindSafe for AggregateMetricTelemetry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more