Freigeben über


MetricsBuilderExtensions.EnableMetrics Method

Definition

Overloads

EnableMetrics(IMetricsBuilder, String)

Enables all instruments for the given meter, for all registered listeners.

EnableMetrics(MetricsOptions, String)

Enables all instruments for the given meter, for all registered listeners.

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

Enables a specified Instrument for the given Meter and IMetricsListener.

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

Enables a specified Instrument for the given Meter and IMetricsListener.

EnableMetrics(IMetricsBuilder, String)

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

Enables all instruments for the given meter, for all registered listeners.

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

Parameters

meterName
String

The Name or prefix. A null value matches all meters.

Returns

The original IMetricsBuilder for chaining.

Applies to

EnableMetrics(MetricsOptions, String)

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

Enables all instruments for the given meter, for all registered listeners.

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

Parameters

meterName
String

The Name or prefix. A null value matches all meters.

Returns

The original MetricsOptions for chaining.

Applies to

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

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

Enables a specified Instrument for the given Meter and IMetricsListener.

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

Parameters

meterName
String

The Name or prefix. A null value matches all meters.

instrumentName
String

The Name. A null value matches all instruments.

listenerName
String

The IMetricsListener.Name. A null value matches all listeners.

scopes
MeterScope

Indicates which meter scopes to consider. Defaults to all scopes.

Returns

The original IMetricsBuilder for chaining.

Applies to

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

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

Enables a specified Instrument for the given Meter and IMetricsListener.

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

Parameters

meterName
String

The Name or prefix. A null value matches all meters.

instrumentName
String

The Name. A null value matches all instruments.

listenerName
String

The IMetricsListener.Name. A null value matches all listeners.

scopes
MeterScope

Indicates which meter scopes to consider. Default to all scopes.

Returns

The original MetricsOptions for chaining.

Applies to