InstrumentRule(String, String, String, MeterScope, Boolean) Constructor
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.
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
- 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