<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0-preview.2.23128.3" />

UpDownCounter<T>

public sealed class UpDownCounter<T> : Instrument<T> where T : struct
The UpDownCounter is 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)

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

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

Record 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)

Record 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)

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

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

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

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

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

public void Add(T delta, ref TagList tagList)

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