Meter.CreateObservableGauge Method
Definition
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.
Overloads
CreateObservableGauge<T>(String, Func<Measurement<T>>, String, String, IEnumerable<KeyValuePair<String,Object>>) |
ObservableGauge is an asynchronous Instrument which reports non-additive value(s) (e.g. the room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up) when the instrument is being observed. |
CreateObservableGauge<T>(String, Func<T>, String, String, IEnumerable<KeyValuePair<String,Object>>) |
ObservableGauge is an asynchronous Instrument which reports non-additive value(s) (e.g. the room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up) when the instrument is being observed. |
CreateObservableGauge<T>(String, Func<IEnumerable<Measurement<T>>>, String, String, IEnumerable<KeyValuePair<String,Object>>) |
Creates an ObservableGauge instance, which is an asynchronous Instrument that reports non-additive value(s) when the instrument is being observed. |
CreateObservableGauge<T>(String, Func<IEnumerable<Measurement<T>>>, String, String) |
Creates an ObservableGauge, which is an asynchronous instrument that reports non-additive values when the instrument is being observed. |
CreateObservableGauge<T>(String, Func<Measurement<T>>, String, String) |
Creates an ObservableGauge, which is an asynchronous instrument that reports non-additive values when the instrument is being observed. |
CreateObservableGauge<T>(String, Func<T>, String, String) |
Creates an ObservableGauge, which is an asynchronous instrument that reports non-additive values when the instrument is being observed. |
CreateObservableGauge<T>(String, Func<Measurement<T>>, String, String, IEnumerable<KeyValuePair<String,Object>>)
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
ObservableGauge is an asynchronous Instrument which reports non-additive value(s) (e.g. the room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up) when the instrument is being observed.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::ObservableGauge<T> ^ CreateObservableGauge(System::String ^ name, Func<System::Diagnostics::Metrics::Measurement<T>> ^ observeValue, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
member this.CreateObservableGauge : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableGauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableGauge(Of T As Structure) (name As String, observeValue As Func(Of Measurement(Of T)), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableGauge(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.
- tags
- IEnumerable<KeyValuePair<String,Object>>
tags to attach to the counter.
Returns
A new observable gauge.
Applies to
CreateObservableGauge<T>(String, Func<T>, String, String, IEnumerable<KeyValuePair<String,Object>>)
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
ObservableGauge is an asynchronous Instrument which reports non-additive value(s) (e.g. the room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up) when the instrument is being observed.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::ObservableGauge<T> ^ CreateObservableGauge(System::String ^ name, Func<T> ^ observeValue, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<T> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<T> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
member this.CreateObservableGauge : string * Func<'T (requires 'T : struct)> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableGauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableGauge(Of T As Structure) (name As String, observeValue As Func(Of T), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableGauge(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.
- tags
- IEnumerable<KeyValuePair<String,Object>>
tags to attach to the counter.
Returns
A new observable gauge.
Applies to
CreateObservableGauge<T>(String, Func<IEnumerable<Measurement<T>>>, String, String, IEnumerable<KeyValuePair<String,Object>>)
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
Creates an ObservableGauge instance, which is an asynchronous Instrument that reports non-additive value(s) when the instrument is being observed.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::ObservableGauge<T> ^ CreateObservableGauge(System::String ^ name, Func<System::Collections::Generic::IEnumerable<System::Diagnostics::Metrics::Measurement<T>> ^> ^ observeValues, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<System.Collections.Generic.IEnumerable<System.Diagnostics.Metrics.Measurement<T>>> observeValues, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<System.Collections.Generic.IEnumerable<System.Diagnostics.Metrics.Measurement<T>>> observeValues, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
member this.CreateObservableGauge : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableGauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableGauge(Of T As Structure) (name As String, observeValues As Func(Of IEnumerable(Of Measurement(Of T))), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableGauge(Of T)
Type Parameters
- T
The numerical type of the measurement.
Parameters
- name
- String
The instrument name. It 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
An optional instrument unit of measurements.
- description
- String
An optional instrument description.
- tags
- IEnumerable<KeyValuePair<String,Object>>
The tags to attach to the counter.
Returns
A new observable gauge.
Remarks
For example: The room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up.
Applies to
CreateObservableGauge<T>(String, Func<IEnumerable<Measurement<T>>>, String, String)
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
Creates an ObservableGauge, which is an asynchronous instrument that reports non-additive values when the instrument is being observed.
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<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.CreateObservableGauge : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string -> System.Diagnostics.Metrics.ObservableGauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableGauge(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 ObservableGauge(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 ObservableCounter{T}.Observe()
is called by RecordObservableInstruments().
- unit
- String
Optional instrument unit of measurements.
- description
- String
Optional instrument description.
Returns
A new observable gauge.
Remarks
An example of a non-additive value is the room temperature; that is, it doesn't make sense to report the temperature value from multiple rooms and sum them up.
Applies to
CreateObservableGauge<T>(String, Func<Measurement<T>>, String, String)
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
Creates an ObservableGauge, which is an asynchronous instrument that reports non-additive values when the instrument is being observed.
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableGauge : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string -> System.Diagnostics.Metrics.ObservableGauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableGauge(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 ObservableGauge(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 ObservableCounter{T}.Observe()
is called by RecordObservableInstruments().
- unit
- String
Optional instrument unit of measurements.
- description
- String
Optional instrument description.
Returns
A new observable gauge.
Remarks
An example of a non-additive value is the room temperature; that is, it doesn't make sense to report the temperature value from multiple rooms and sum them up.
Applies to
CreateObservableGauge<T>(String, Func<T>, String, String)
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
- Source:
- Meter.cs
Creates an ObservableGauge, which is an asynchronous instrument that reports non-additive values when the instrument is being observed.
public System.Diagnostics.Metrics.ObservableGauge<T> CreateObservableGauge<T> (string name, Func<T> observeValue, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableGauge : string * Func<'T (requires 'T : struct)> * string * string -> System.Diagnostics.Metrics.ObservableGauge<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableGauge(Of T As Structure) (name As String, observeValue As Func(Of T), Optional unit As String = Nothing, Optional description As String = Nothing) As ObservableGauge(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 ObservableCounter{T}.Observe()
is called by RecordObservableInstruments().
- unit
- String
Optional instrument unit of measurements.
- description
- String
Optional instrument description.
Returns
A new observable gauge.
Remarks
An example of a non-additive value is the room temperature; that is, it doesn't make sense to report the temperature value from multiple rooms and sum them up.