<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.0" />

Measurement<T>

public struct Measurement<T> where T : struct
Stores one observed metrics value and its associated tags. This type is used by an Observable instrument's Observe() method when reporting current measurements.
public ReadOnlySpan<KeyValuePair<string, object>> Tags { get; }

Gets the measurement tags list.

public T Value { get; }

Gets the measurement value.

public Measurement(T value)

Initializes a new instance of Measurement<T> using the specified value.

public Measurement(T value, IEnumerable<KeyValuePair<string, object>> tags)

Initializes a new instance of Measurement<T> using the specified value and list of tags.

public Measurement(T value, KeyValuePair<string, object>[] tags)

Initializes a new instance of Measurement<T> using the specified value and list of tags.

public Measurement(T value, ReadOnlySpan<KeyValuePair<string, object>> tags)

Initializes a new instance of Measurement<T> using the specified value and list of tags.