Struct appinsights::telemetry::EventTelemetry
source · [−]pub struct EventTelemetry { /* private fields */ }
Expand description
Represents structured event records.
Examples
use appinsights::telemetry::{Telemetry, EventTelemetry};
// create a telemetry item
let mut telemetry = EventTelemetry::new("Starting data processing");
// 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("records_count".to_string(), 115.0);
// submit telemetry item to server
client.track(telemetry);
Implementations
sourceimpl EventTelemetry
impl EventTelemetry
sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Creates an event telemetry item with specified name.
sourcepub fn measurements(&self) -> &Measurements
pub fn measurements(&self) -> &Measurements
Returns custom measurements to submit with the telemetry item.
sourcepub fn measurements_mut(&mut self) -> &mut Measurements
pub fn measurements_mut(&mut self) -> &mut Measurements
Returns mutable reference to custom measurements.
Trait Implementations
sourceimpl Debug for EventTelemetry
impl Debug for EventTelemetry
sourceimpl Telemetry for EventTelemetry
impl Telemetry for EventTelemetry
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 EventTelemetry
impl Send for EventTelemetry
impl Sync for EventTelemetry
impl Unpin for EventTelemetry
impl UnwindSafe for EventTelemetry
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