Struct appinsights::telemetry::TraceTelemetry[][src]

pub struct TraceTelemetry { /* fields omitted */ }
Expand description

Represents printf-like trace statements that can be text searched. A trace telemetry items have a message and an associated SeverityLevel.

Examples

use appinsights::telemetry::{TraceTelemetry, SeverityLevel, Telemetry};

// create a telemetry item
let mut telemetry = TraceTelemetry::new("Starting data processing", SeverityLevel::Information);

// 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

Creates an event telemetry item with specified name.

Returns custom measurements to submit with the telemetry item.

Returns mutable reference to custom measurements.

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

Performs the conversion.

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

Performs the conversion.

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.