Struct appinsights::telemetry::MetricTelemetry
source · [−]pub struct MetricTelemetry { /* private fields */ }
Expand description
Metric telemetry item that represents a single data point.
Examples
use appinsights::telemetry::{Telemetry, MetricTelemetry};
// create a telemetry item
let mut telemetry = MetricTelemetry::new("temp_sensor", 55.0);
// 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 MetricTelemetry
impl Debug for MetricTelemetry
sourceimpl Telemetry for MetricTelemetry
impl Telemetry for MetricTelemetry
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 MetricTelemetry
impl Send for MetricTelemetry
impl Sync for MetricTelemetry
impl Unpin for MetricTelemetry
impl UnwindSafe for MetricTelemetry
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