Meter.CreateObservableCounter 方法

定义

重载

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

创建一个 ObservableCounter,它是一种检测,在观察检测时报告单调递增值的检测器。

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

创建一个 ObservableCounter,它是一种检测,在观察检测时报告单调递增值的检测器。

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

创建一个 ObservableCounter,它是一种检测,在观察检测时报告单调递增值的检测器。

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

创建一个 ObservableCounter 实例,该实例是一个检测器,用于在观察检测时报告单调递增值。

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

创建一个 ObservableCounter 实例,该实例是一个检测器,用于在观察检测时报告单调递增值。

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

创建一个 ObservableCounter 实例,该实例是一个检测器,用于在观察检测时报告单调递增值。

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

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

创建一个 ObservableCounter,它是一种检测,在观察检测时报告单调递增值的检测器。

public System.Diagnostics.Metrics.ObservableCounter<T> CreateObservableCounter<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.CreateObservableCounter : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string -> System.Diagnostics.Metrics.ObservableCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableCounter(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 ObservableCounter(Of T)

类型参数

T

度量的数字类型。

参数

name
String

检测名称。 不能 null

observeValues
Func<IEnumerable<Measurement<T>>>

RecordObservableInstruments()调用 ObservableCounter{T}.Observe() 时要调用以获取度量的回调。

unit
String

可选的测量单位。

description
String

可选检测说明。

返回

新的可观测计数器。

注解

ObservableCounter 的示例用法:每个进程的页错误数。

适用于

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

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

创建一个 ObservableCounter,它是一种检测,在观察检测时报告单调递增值的检测器。

public System.Diagnostics.Metrics.ObservableCounter<T> CreateObservableCounter<T> (string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableCounter : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string -> System.Diagnostics.Metrics.ObservableCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableCounter(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 ObservableCounter(Of T)

类型参数

T

度量的数字类型。

参数

name
String

检测名称。 不能 null

observeValue
Func<Measurement<T>>

RecordObservableInstruments() 调用 ObservableCounter{T}.Observe() 时要获取度量的回调

unit
String

可选的测量单位。

description
String

可选检测说明。

返回

新的可观测计数器。

注解

ObservableCounter 的示例用法:每个进程的页错误数。

适用于

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

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

创建一个 ObservableCounter,它是一种检测,在观察检测时报告单调递增值的检测器。

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

类型参数

T

度量的数字类型。

参数

name
String

检测名称。 不能 null

observeValue
Func<T>

RecordObservableInstruments()调用 ObservableCounter{T}.Observe() 时要调用以获取度量的回调。

unit
String

可选的测量单位。

description
String

可选检测说明。

返回

新的可观测计数器。

注解

ObservableCounter 的示例用法:每个进程的页错误数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs

创建一个 ObservableCounter 实例,该实例是一个检测器,用于在观察检测时报告单调递增值。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::ObservableCounter<T> ^ CreateObservableCounter(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.ObservableCounter<T> CreateObservableCounter<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.CreateObservableCounter : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableCounter(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 ObservableCounter(Of T)

类型参数

T

度量的数字类型。

参数

name
String

检测名称。 它不能 null

observeValues
Func<IEnumerable<Measurement<T>>>

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

unit
String

可选的测量单位。

description
String

可选检测说明。

tags
IEnumerable<KeyValuePair<String,Object>>

要附加到计数器的标记。

返回

新的可观测计数器。

注解

ObservableCounter 的示例用法:每个进程的页错误数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs

创建一个 ObservableCounter 实例,该实例是一个检测器,用于在观察检测时报告单调递增值。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::ObservableCounter<T> ^ CreateObservableCounter(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.ObservableCounter<T> CreateObservableCounter<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.CreateObservableCounter : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableCounter(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 ObservableCounter(Of T)

类型参数

T

度量的数字类型。

参数

name
String

检测名称。 它不能 null

observeValue
Func<Measurement<T>>

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

unit
String

可选的测量单位。

description
String

可选检测说明。

tags
IEnumerable<KeyValuePair<String,Object>>

要附加到计数器的标记。

返回

新的可观测计数器。

注解

ObservableCounter 的示例用法:每个进程的页错误数。

适用于

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

Source:
Meter.cs
Source:
Meter.cs

创建一个 ObservableCounter 实例,该实例是一个检测器,用于在观察检测时报告单调递增值。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::ObservableCounter<T> ^ CreateObservableCounter(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.ObservableCounter<T> CreateObservableCounter<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.CreateObservableCounter : string * Func<'T (requires 'T : struct)> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableCounter(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 ObservableCounter(Of T)

类型参数

T

度量的数字类型。

参数

name
String

检测名称。 它不能 null

observeValue
Func<T>

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

unit
String

可选的测量单位。

description
String

可选检测说明。

tags
IEnumerable<KeyValuePair<String,Object>>

要附加到计数器的标记。

返回

新的可观测计数器。

注解

ObservableCounter 的示例用法:每个进程的页错误数。

适用于