Meter.CreateGauge Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
- Source:
- Meter.cs
Creates a Gauge instrument, which can be used to record non-additive values.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::Gauge<T> ^ CreateGauge(System::String ^ name);
public System.Diagnostics.Metrics.Gauge<T> CreateGauge<T>(string name) where T : struct;
member this.CreateGauge : string -> System.Diagnostics.Metrics.Gauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateGauge(Of T As Structure) (name As String) As Gauge(Of T)
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) |
- Source:
- Meter.cs
Create a metrics Gauge object.
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;
member this.CreateGauge : string * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.Gauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateGauge(Of T As Structure) (name As String, Optional unit As String = Nothing, Optional description As String = Nothing, Optional tags As IEnumerable(Of KeyValuePair(Of String, Object)) = Nothing) As Gauge(Of T)
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) |
Toote „.NET“ tagasiside
.NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: