<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0-rc.1.23419.4" />

Counter<T>

public sealed class Counter<T> : Instrument<T> where T : struct
Represents 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 display counters using a rate (requests/sec), by default, but can also display a cumulative total.
public void Add(T delta)

Records the increment value of the measurement.

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

Records the increment value of the measurement.

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

Records the increment value of the measurement.

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

Records the increment value of the measurement.

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

Records the increment value of the measurement.

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

Records the increment value of the measurement.

public void Add(T delta, ref TagList tagList)

Adds the increment value of the measurement.