MetricsBuilderExtensions.EnableMetrics Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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
- builder
- IMetricsBuilder
The IMetricsBuilder.
Returns
The original IMetricsBuilder for chaining.
Applies to
EnableMetrics(MetricsOptions, String)
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
- options
- MetricsOptions
The MetricsOptions.
Returns
The original MetricsOptions for chaining.
Applies to
EnableMetrics(IMetricsBuilder, String, String, String, MeterScope)
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
- builder
- IMetricsBuilder
The IMetricsBuilder.
- 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)
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
- options
- MetricsOptions
The MetricsOptions.
- 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.