MetricTelemetry Class

Definition

Telemetry type used to track metrics. Represents a sample set of values with a specified count, sum, max, min, and standard deviation. Learn more

public sealed class MetricTelemetry : Microsoft.ApplicationInsights.Channel.ITelemetry, Microsoft.ApplicationInsights.DataContracts.ISupportProperties
type MetricTelemetry = class
    interface ITelemetry
    interface ISupportProperties
Public NotInheritable Class MetricTelemetry
Implements ISupportProperties, ITelemetry
Inheritance
MetricTelemetry
Implements

Constructors

MetricTelemetry()

Initializes a new instance of the MetricTelemetry class with empty properties.

MetricTelemetry(String, Double)

Obsolete - use MetricTelemetry(name,count,sum,min,max,standardDeviation). Initializes a new instance of the MetricTelemetry class with the specified metricName and metricValue.

MetricTelemetry(String, Int32, Double, Double, Double, Double)

Initializes a new instance of the MetricTelemetry class with properties provided.

MetricTelemetry(String, String, Int32, Double, Double, Double, Double)

Initializes a new instance of the MetricTelemetry class with properties provided.

Properties

Context

Gets the context associated with the current telemetry item.

Count

Gets or sets the number of values in the sample set.

Extension

Gets or sets gets the extension used to extend this telemetry instance using new strong typed object.

Max

Gets or sets the max value of this metric across the sample set.

MetricNamespace

Gets or sets the name of the metric.

Min

Gets or sets the min value of this metric across the sample set.

Name

Gets or sets the name of the metric.

Properties

Gets a dictionary of application-defined property names and values providing additional information about this metric. Learn more

Sequence

Gets or sets the value that defines absolute order of the telemetry item.

StandardDeviation

Gets or sets the standard deviation of this metric across the sample set.

Sum

Gets or sets sum of the values of the metric samples.

Timestamp

Gets or sets date and time when event was recorded.

Value
Obsolete.

Gets or sets the value of this metric.

Methods

DeepClone()

Deeply clones a MetricTelemetry object.

SerializeData(ISerializationWriter)

Writes serialization info about the data class of the implementing type using the given ISerializationWriter.

Explicit Interface Implementations

ITelemetry.Sanitize()

Sanitizes the properties based on constraints.

Extension Methods

GetEnvelopeName(ITelemetry)

Gets envelope name for ITelemetry object.

TrySetEnvelopeName(ITelemetry, String)

Sets envelope name for ITelemetry object.

Applies to