Dela via


InstrumentRule Class

Definition

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

public ref class InstrumentRule
public class InstrumentRule
type InstrumentRule = class
Public Class InstrumentRule
Inheritance
InstrumentRule

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

Constructors

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

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

Properties

Enable

Gets a value that indicates whether the instrument should be enabled for the listener.

InstrumentName

Gets the Instrument.Name, an exact match. All instruments for the given meter are matched if this is null.

ListenerName

Gets the IMetricsListener.Name, an exact match. All listeners are matched if this is null.

MeterName

Gets the Meter.Name, either an exact match or the longest prefix match. Only full segment matches are considered. All meters are matched if this is null.

Scopes

Gets the MeterScope. This is used to distinguish between meters created via Meter constructors (Global) and those created via Dependency Injection with Create(MeterOptions) (Local)."/>.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to