共用方式為


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)

來源:
MetricsBuilderExtensions.Rules.cs
來源:
MetricsBuilderExtensions.Rules.cs
來源:
MetricsBuilderExtensions.Rules.cs
來源:
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)

來源:
MetricsBuilderExtensions.Rules.cs
來源:
MetricsBuilderExtensions.Rules.cs
來源:
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)

來源:
MetricsBuilderExtensions.Rules.cs
來源:
MetricsBuilderExtensions.Rules.cs
來源:
MetricsBuilderExtensions.Rules.cs
來源:
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)

來源:
MetricsBuilderExtensions.Rules.cs
來源:
MetricsBuilderExtensions.Rules.cs
來源:
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

適用於