MetricsBuilderExtensions.EnableMetrics 方法

定义

重载

EnableMetrics(IMetricsBuilder, String)

为所有已注册的 IMetricsListeners 启用给定计量器的所有 Instruments

EnableMetrics(MetricsOptions, String)

为所有已注册的 IMetricsListeners 启用给定计量器的所有 Instruments

EnableMetrics(IMetricsBuilder, String, String, String, MeterScope)

为给定 MeterIMetricsListener启用指定的 Instrument

EnableMetrics(MetricsOptions, String, String, String, MeterScope)

为给定 MeterIMetricsListener启用指定的 Instrument

EnableMetrics(IMetricsBuilder, String)

Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs

为所有已注册的 IMetricsListeners 启用给定计量器的所有 Instruments

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ EnableMetrics(Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ builder, System::String ^ meterName);
public static Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder EnableMetrics (this Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder builder, string? meterName);
static member EnableMetrics : Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder * string -> Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder
<Extension()>
Public Function EnableMetrics (builder As IMetricsBuilder, meterName As String) As IMetricsBuilder

参数

meterName
String

Name或 前缀。 null 值与所有米匹配。

返回

用于链接的原始 IMetricsBuilder 值。

适用于

EnableMetrics(MetricsOptions, String)

Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs

为所有已注册的 IMetricsListeners 启用给定计量器的所有 Instruments

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Diagnostics::Metrics::MetricsOptions ^ EnableMetrics(Microsoft::Extensions::Diagnostics::Metrics::MetricsOptions ^ options, System::String ^ meterName);
public static Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions EnableMetrics (this Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions options, string? meterName);
static member EnableMetrics : Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions * string -> Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions
<Extension()>
Public Function EnableMetrics (options As MetricsOptions, meterName As String) As MetricsOptions

参数

meterName
String

Name或 前缀。 null 值与所有米匹配。

返回

用于链接的原始 MetricsOptions 值。

适用于

EnableMetrics(IMetricsBuilder, String, String, String, MeterScope)

Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs

为给定 MeterIMetricsListener启用指定的 Instrument

public static Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder EnableMetrics (this Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder builder, string? meterName, string? instrumentName = default, string? listenerName = default, Microsoft.Extensions.Diagnostics.Metrics.MeterScope scopes = Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Global | Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Local);
static member EnableMetrics : Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder * string * string * string * Microsoft.Extensions.Diagnostics.Metrics.MeterScope -> Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder
<Extension()>
Public Function EnableMetrics (builder As IMetricsBuilder, meterName As String, Optional instrumentName As String = Nothing, Optional listenerName As String = Nothing, Optional scopes As MeterScope = Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Global | Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Local) As IMetricsBuilder

参数

meterName
String

Name或 前缀。 null 值与所有米匹配。

instrumentName
String

Name。 null 值与所有工具匹配。

listenerName
String

IMetricsListener名字。 null 值匹配所有侦听器。

scopes
MeterScope

指示要考虑的 MeterScope。 默认为所有范围。

返回

用于链接的原始 IMetricsBuilder 值。

适用于

EnableMetrics(MetricsOptions, String, String, String, MeterScope)

Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs
Source:
MetricsBuilderExtensions.Rules.cs

为给定 MeterIMetricsListener启用指定的 Instrument

public static Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions EnableMetrics (this Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions options, string? meterName, string? instrumentName = default, string? listenerName = default, Microsoft.Extensions.Diagnostics.Metrics.MeterScope scopes = Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Global | Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Local);
static member EnableMetrics : Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions * string * string * string * Microsoft.Extensions.Diagnostics.Metrics.MeterScope -> Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions
<Extension()>
Public Function EnableMetrics (options As MetricsOptions, meterName As String, Optional instrumentName As String = Nothing, Optional listenerName As String = Nothing, Optional scopes As MeterScope = Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Global | Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Local) As MetricsOptions

参数

meterName
String

Name或 前缀。 null 值与所有米匹配。

instrumentName
String

Name。 null 值与所有工具匹配。

listenerName
String

IMetricsListener名字。 null 值匹配所有侦听器。

scopes
MeterScope

指示要考虑的 MeterScope。 默认为所有范围。

返回

用于链接的原始 MeterOptions 值。

适用于