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

UpDownCounter<T>

public sealed class UpDownCounter<T> : Instrument<T> where T : struct
An instrument that supports reporting positive or negative metric values. UpDownCounter may be used in scenarios like reporting the change in active requests or queue size.
public void Add(T delta)

Records the delta value of the measurement. The delta can be positive, negative, or zero.

public void Add(T delta, KeyValuePair<string, object> tag)

Records the delta value of the measurement. The delta can be positive, negative, or zero.

public void Add(T delta, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2)

Records the delta value of the measurement. The delta can be positive, negative, or zero.

public void Add(T delta, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2, KeyValuePair<string, object> tag3)

Records the delta value of the measurement. The delta can be positive, negative, or zero.

public void Add(T delta, ReadOnlySpan<KeyValuePair<string, object>> tags)

Records the delta value of the measurement. The delta can be positive, negative, or zero.

public void Add(T delta, KeyValuePair<string, object>[] tags)

Records the delta value of the measurement. The delta can be positive, negative, or zero.

public void Add(T delta, ref TagList tagList)

Records the delta value of the measurement. The delta can be positive, negative, or zero.