<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="10.0.0-rc.1.25451.107" />

System.Diagnostics.Metrics.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.
namespace System.Diagnostics.Metrics { public sealed class UpDownCounter<T> : Instrument<T> where T : struct { public void Add(T delta); public void Add(T delta, KeyValuePair<string, object> tag); public void Add(T delta, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2); public void Add(T delta, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2, KeyValuePair<string, object> tag3); public void Add(T delta, ReadOnlySpan<KeyValuePair<string, object>> tags); public void Add(T delta, params KeyValuePair<string, object>[] tags); public void Add(T delta, ref TagList tagList); } }