<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />

Microsoft.ApplicationInsights.DataContracts.MetricTelemetry

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 TelemetryContext Context { get; }

Gets the context associated with the current telemetry item.

public int? Count { get; set; }

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

public IExtension Extension { get; set; }

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

public double? Max { get; set; }

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

public string MetricNamespace { get; set; }

Gets or sets the name of the metric.

public double? Min { get; set; }

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

public string Name { get; set; }

Gets or sets the name of the metric.

public IDictionary<string, string> Properties { get; }

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

public string Sequence { get; set; }

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

public double? StandardDeviation { get; set; }

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

public double Sum { get; set; }

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

public DateTimeOffset Timestamp { get; set; }

Gets or sets date and time when event was recorded.

public double Value { get; set; }

Gets or sets the value of this metric.

public MetricTelemetry()

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

public MetricTelemetry(string metricName, double metricValue)

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

public MetricTelemetry(string name, int count, double sum, double min, double max, double standardDeviation)

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

public MetricTelemetry(string metricNamespace, string name, int count, double sum, double min, double max, double standardDeviation)

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

Deeply clones a MetricTelemetry object.

public void SerializeData(ISerializationWriter serializationWriter)