Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​Extensions.​Diagnostics.​Metrics.​InstrumentRule
Assembly: Microsoft.Extensions.Diagnostics.Abstractions
Inheritance: object → InstrumentRule
Contains a set of parameters used to determine which instruments are enabled for which listeners. Unspecified parameters match anything.
Remarks
<para>The most specific rule that matches a given instrument will be used. The priority of parameters is as follows:</para> <para>- MeterName, either an exact match, or the longest prefix match. See <see cref="P:System.Diagnostics.Metrics.Meter.Name">Meter.Name</see>.</para> <para>- InstrumentName, an exact match. <see cref="P:System.Diagnostics.Metrics.Instrument.Name">Instrument.Name</see>.</para> <para>- ListenerName, an exact match. <see cref="P:Microsoft.Extensions.Diagnostics.Metrics.IMetricsListener.Name">IMetricsListener.Name</see>.</para> <para>- Scopes</para>
Properties
public
string
MeterName
Gets the <see cref="P:System.Diagnostics.Metrics.Meter.Name">Meter.Name</see> , either an exact match or the longest prefix match. Only full segment matches are considered.
public
string
InstrumentName
Gets the <see cref="P:System.Diagnostics.Metrics.Instrument.Name">Instrument.Name</see> , an exact match.
public
string
ListenerName
Gets the <see cref="P:Microsoft.Extensions.Diagnostics.Metrics.IMetricsListener.Name">IMetricsListener.Name</see> , an exact match.
public
MeterScope
Scopes
Gets the <see cref="T:Microsoft.Extensions.Diagnostics.Metrics.MeterScope" /> .
Remarks This property is used to distinguish between meters created via <see cref="T:System.Diagnostics.Metrics.Meter" /> constructors ( <see cref="F:Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Global" /> )
and those created via Dependency Injection with <see cref="M:System.Diagnostics.Metrics.IMeterFactory.Create(System.Diagnostics.Metrics.MeterOptions)" /> ( <see cref="F:Microsoft.Extensions.Diagnostics.Metrics.MeterScope.Local" /> ).
public
bool
Enable
Gets a value that indicates whether the instrument should be enabled for the listener.
Methods
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object