Meter.CreateUpDownCounter<T>(String, String, String) Method

Definition

Create a metrics UpDownCounter object.

public System.Diagnostics.Metrics.UpDownCounter<T> CreateUpDownCounter<T> (string name, string? unit = default, string? description = default) where T : struct;
member this.CreateUpDownCounter : string * string * string -> System.Diagnostics.Metrics.UpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateUpDownCounter(Of T As Structure) (name As String, Optional unit As String = Nothing, Optional description As String = Nothing) As UpDownCounter(Of T)

Type Parameters

T

The numerical type of the measurement.

Parameters

name
String

The instrument name. Cannot be null.

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

Returns

UpDownCounter<T>

A new up down counter.

Remarks

UpDownCounter is an Instrument which supports reporting positive or negative metric values. Example uses for UpDownCounter: reporting the change in active requests or queue size.

Applies to