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

Counter<T>

public sealed class Counter<T> : Instrument<T> where T : struct
The counter is an instrument that supports adding non-negative values. For example you might call counter.Add(1) each time a request is processed to track the total number of requests. Most metric viewers will display counters using a rate by default (requests/sec) but can also display a cumulative total.
public void Add(T delta)

Record the increment value of the measurement.

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

Record the increment value of the measurement.

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

Record the increment value of the measurement.

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

Record the increment value of the measurement.

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

Record the increment value of the measurement.

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

Record the increment value of the measurement.

public void Add(T delta, ref TagList tagList)

Record the increment value of the measurement.