Edit

Share via


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

Definition

Initializes a new instance of the InstrumentRule class.

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 Name or prefix.

instrumentName
String

The Name.

listenerName
String

The Name.

scopes
MeterScope

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

enable
Boolean

trueto 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 Name.

- InstrumentName, an exact match. Name.

- ListenerName, an exact match. Name.

- Scopes

Applies to