Meter.CreateObservableUpDownCounter Method

Definition

Overloads

CreateObservableUpDownCounter<T>(String, Func<IEnumerable<Measurement<T>>>, String, String)

Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.

CreateObservableUpDownCounter<T>(String, Func<Measurement<T>>, String, String)

Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.

CreateObservableUpDownCounter<T>(String, Func<T>, String, String)

Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.

CreateObservableUpDownCounter<T>(String, Func<IEnumerable<Measurement<T>>>, String, String)

Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.

public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T> (string name, Func<System.Collections.Generic.IEnumerable<System.Diagnostics.Metrics.Measurement<T>>> observeValues, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValues As Func(Of IEnumerable(Of Measurement(Of T))), Optional unit As String = Nothing, Optional description As String = Nothing) As ObservableUpDownCounter(Of T)

Type Parameters

T

The numerical type of the measurement.

Parameters

name
String

The instrument name. Cannot be null.

observeValues
Func<IEnumerable<Measurement<T>>>

The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments().

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

Returns

ObservableUpDownCounter<T>

A new observable up down counter.

Remarks

Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.

Applies to

CreateObservableUpDownCounter<T>(String, Func<Measurement<T>>, String, String)

Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.

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

Type Parameters

T

The numerical type of the measurement.

Parameters

name
String

The instrument name. Cannot be null.

observeValue
Func<Measurement<T>>

The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments()

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

Returns

ObservableUpDownCounter<T>

A new observable up down counter.

Remarks

Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.

Applies to

CreateObservableUpDownCounter<T>(String, Func<T>, String, String)

Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.

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

Type Parameters

T

The numerical type of the measurement.

Parameters

name
String

The instrument name. Cannot be null.

observeValue
Func<T>

The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments().

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

Returns

ObservableUpDownCounter<T>

A new observable up down counter.

Remarks

Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.

Applies to