Struct appinsights::telemetry::AvailabilityTelemetry [−][src]
pub struct AvailabilityTelemetry { /* fields omitted */ }
Expand description
Represents the result of executing an availability test.
Examples
use appinsights::telemetry::{Telemetry, AvailabilityTelemetry};
use std::time::Duration;
// create a telemetry item
let mut telemetry = AvailabilityTelemetry::new(
"PING https://api.github.com/dmolokanov/appinsights-rs",
Duration::from_secs(2),
true,
);
// attach custom properties, measurements and context tags
telemetry.properties_mut().insert("component".to_string(), "data_processor".to_string());
telemetry.tags_mut().insert("os_version".to_string(), "linux x86_64".to_string());
telemetry.measurements_mut().insert("body_size".to_string(), 115.0);
// submit telemetry item to server
client.track(telemetry);
Implementations
Creates a new availability telemetry item with the specified test name, duration and success code.
Returns custom measurements to submit with the telemetry item.
Returns mutable reference to custom measurements.
Trait Implementations
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.