Meter.CreateObservableUpDownCounter 方法

定义

重载

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

创建 ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观察仪器时,它报告值增加或减少。

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

创建 ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观察仪器时,它报告值增加或减少。

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

创建 ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观察仪器时,它报告值增加或减少。

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

Create ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观测到仪器时,它报告 () 值递增或递减。

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

Create ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观测到仪器时,它报告 () 值递增或递减。

CreateObservableUpDownCounter<T>(String, Func<T>, String, String, IEnumerable<KeyValuePair<String,Object>>)

Create ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观测到仪器时,它报告 () 值递增或递减。

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

Source:
Meter.cs
Source:
Meter.cs
Source:
Meter.cs

创建 ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观察仪器时,它报告值增加或减少。

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)

类型参数

T

度量的数值类型。

参数

name
String

仪器名称。 不能为 null

observeValues
Func<IEnumerable<Measurement<T>>>

调用 时Observe()RecordObservableInstruments()要调用以获取度量值的回调。

unit
String

可选的仪表度量单位。

description
String

可选仪器说明。

返回

新的可观测向上向下计数器。

注解

示例使用 ObservableUpDownCounter:进程堆大小或无锁循环缓冲区中的大致项数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs
Source:
Meter.cs

创建 ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观察仪器时,它报告值增加或减少。

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)

类型参数

T

度量的数值类型。

参数

name
String

仪器名称。 不能为 null

observeValue
Func<Measurement<T>>

调用 时 Observe() 要调用以获取度量值的回调 RecordObservableInstruments()

unit
String

可选的仪表度量单位。

description
String

可选仪器说明。

返回

新的可观测向上向下计数器。

注解

示例使用 ObservableUpDownCounter:进程堆大小或无锁循环缓冲区中的大致项数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs
Source:
Meter.cs

创建 ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观察仪器时,它报告值增加或减少。

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)

类型参数

T

度量的数值类型。

参数

name
String

仪器名称。 不能为 null

observeValue
Func<T>

调用 时Observe()RecordObservableInstruments()要调用以获取度量值的回调。

unit
String

可选的仪表度量单位。

description
String

可选仪器说明。

返回

新的可观测向上向下计数器。

注解

示例使用 ObservableUpDownCounter:进程堆大小或无锁循环缓冲区中的大致项数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs

Create ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观测到仪器时,它报告 () 值递增或递减。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::ObservableUpDownCounter<T> ^ CreateObservableUpDownCounter(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.ObservableUpDownCounter<T> CreateObservableUpDownCounter<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.CreateObservableUpDownCounter : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> 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))), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableUpDownCounter(Of T)

类型参数

T

度量的数值类型。

参数

name
String

仪器名称。 不能为 null

observeValues
Func<IEnumerable<Measurement<T>>>

调用 时Observe()RecordObservableInstruments()要调用以获取度量值的回调。

unit
String

可选的仪表度量单位。

description
String

可选仪器说明。

tags
IEnumerable<KeyValuePair<String,Object>>

要附加到计数器的标记。

返回

新的可观测向上向下计数器。

注解

示例使用 ObservableUpDownCounter:进程堆大小或无锁循环缓冲区中的大致项数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs

Create ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观测到仪器时,它报告 () 值递增或递减。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::ObservableUpDownCounter<T> ^ CreateObservableUpDownCounter(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.ObservableUpDownCounter<T> CreateObservableUpDownCounter<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.CreateObservableUpDownCounter : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> 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)), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableUpDownCounter(Of T)

类型参数

T

度量的数值类型。

参数

name
String

仪器名称。 不能为 null

observeValue
Func<Measurement<T>>

调用 时 Observe() 要调用以获取度量值的回调 RecordObservableInstruments()

unit
String

可选的仪表度量单位。

description
String

可选仪器说明。

tags
IEnumerable<KeyValuePair<String,Object>>

要附加到计数器的标记。

返回

新的可观测向上向下计数器。

注解

示例使用 ObservableUpDownCounter:进程堆大小或无锁循环缓冲区中的大致项数。

适用于

CreateObservableUpDownCounter<T>(String, Func<T>, String, String, IEnumerable<KeyValuePair<String,Object>>)

Source:
Meter.cs
Source:
Meter.cs

Create ObservableUpDownCounter 对象。 ObservableUpDownCounter 是一种检测器,当观测到仪器时,它报告 () 值递增或递减。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::ObservableUpDownCounter<T> ^ CreateObservableUpDownCounter(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.ObservableUpDownCounter<T> CreateObservableUpDownCounter<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.CreateObservableUpDownCounter : string * Func<'T (requires 'T : struct)> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> 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), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableUpDownCounter(Of T)

类型参数

T

度量的数值类型。

参数

name
String

仪器名称。 不能为 null

observeValue
Func<T>

调用 时Observe()RecordObservableInstruments()要调用以获取度量值的回调。

unit
String

可选的仪表度量单位。

description
String

可选仪器说明。

tags
IEnumerable<KeyValuePair<String,Object>>

要附加到计数器的标记。

返回

新的可观测向上向下计数器。

注解

示例使用 ObservableUpDownCounter:进程堆大小或无锁循环缓冲区中的大致项数。

适用于