Jaa


InstrumentRule(String, String, String, MeterScope, Boolean) Constructor

Definition

Contains a set of parameters used to determine which instruments are enabled for which listeners. Unspecified parameters match anything.

public:
 InstrumentRule(System::String ^ meterName, System::String ^ instrumentName, System::String ^ listenerName, Microsoft::Extensions::Diagnostics::Metrics::MeterScope scopes, bool enable);
public InstrumentRule (string? meterName, string? instrumentName, string? listenerName, Microsoft.Extensions.Diagnostics.Metrics.MeterScope scopes, bool enable);
new Microsoft.Extensions.Diagnostics.Metrics.InstrumentRule : string * string * string * Microsoft.Extensions.Diagnostics.Metrics.MeterScope * bool -> Microsoft.Extensions.Diagnostics.Metrics.InstrumentRule
Public Sub New (meterName As String, instrumentName As String, listenerName As String, scopes As MeterScope, enable As Boolean)

Parameters

meterName
String

The Meter.Name or prefix.

instrumentName
String

The Instrument.Name.

listenerName
String

The IMetricsListener.Name.

scopes
MeterScope

A bitwise combination of the enumeration values that specifies the scopes to consider.

enable
Boolean

true to enable the matched instrument for this listener; otherwise, false.

Remarks

The most specific rule that matches a given instrument will be used. The priority of parameters is as follows:

- MeterName, either an exact match, or the longest prefix match. See Meter.Name.

- InstrumentName, an exact match. Instrument.Name.

- ListenerName, an exact match. IMetricsListener.Name.

- Scopes

Applies to