Meter.CreateGauge Method

Definition

Overloads

CreateGauge<T>(String)

Creates a Gauge instrument, which can be used to record non-additive values.

CreateGauge<T>(String, String, String, IEnumerable<KeyValuePair<String,Object>>)

Create a metrics Gauge object.

CreateGauge<T>(String)

Source:
Meter.cs

Creates a Gauge instrument, which can be used to record non-additive values.

C#
public System.Diagnostics.Metrics.Gauge<T> CreateGauge<T>(string name) where T : struct;

Type Parameters

T

Parameters

name
String

The instrument name. cannot be null.

Returns

Remarks

Gauge is an Instrument which used to record non-additive values.

Example uses for Gauge: record the room background noise level value when changes occur.

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

CreateGauge<T>(String, String, String, IEnumerable<KeyValuePair<String,Object>>)

Source:
Meter.cs

Create a metrics Gauge object.

C#
public System.Diagnostics.Metrics.Gauge<T> CreateGauge<T>(string name, string? unit = default, string? description = default, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags = default) where T : struct;

Type Parameters

T

Parameters

name
String

The instrument name. cannot be null.

unit
String

Optional instrument unit of measurements.

description
String

Optional instrument description.

tags
IEnumerable<KeyValuePair<String,Object>>

tags to attach to the Gauge.

Returns

Remarks

Gauge is an Instrument which used to record non-additive values.

Example uses for Gauge: record the room background noise level value when changes occur.

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)