2 instantiations of InstrumentRule
Microsoft.Extensions.Diagnostics (2)
Metrics\Configuration\MetricsConfigureOptions.cs (2)
89
options.Rules.Add(new
InstrumentRule
(meterName, instrumentName: null, listenerName, scopes, meterEnabled));
108
options.Rules.Add(new
InstrumentRule
(meterSection.Key, instrumentName, listenerName, scopes, instrumentEnabled));
13 references to InstrumentRule
Microsoft.Extensions.Diagnostics (10)
Metrics\ListenerSubscription.cs (10)
17
private IList<
InstrumentRule
> _rules = Array.Empty<
InstrumentRule
>();
83
internal void UpdateRules(IList<
InstrumentRule
> rules)
106
var
rule = GetMostSpecificRule(instrument);
129
private
InstrumentRule
? GetMostSpecificRule(Instrument instrument)
131
InstrumentRule
? best = null;
132
foreach (
var
rule in _rules)
145
internal static bool RuleMatches(
InstrumentRule
rule, Instrument instrument, string listenerName, IMeterFactory meterFactory)
206
internal static bool IsMoreSpecific(
InstrumentRule
rule,
InstrumentRule
? best, bool isLocalScope)
Microsoft.Extensions.Diagnostics.Abstractions (3)
Metrics\MeterScope.cs (1)
10
/// Represents scopes used by <see cref="
InstrumentRule
"/> to distinguish between meters created via <see cref="Meter"/> constructors (<see cref="Global"/>)
Metrics\MetricsOptions.cs (2)
16
public IList<
InstrumentRule
> Rules { get; } = new List<
InstrumentRule
>();