39 references to MeterScope
Microsoft.Extensions.Diagnostics (20)
Metrics\Configuration\MetricsConfigureOptions.cs (10)
33
LoadMeterRules(options, configurationSection,
MeterScope
.Global |
MeterScope
.Local, null);
38
LoadMeterRules(options, configurationSection,
MeterScope
.Global, null);
43
LoadMeterRules(options, configurationSection,
MeterScope
.Local, null);
52
LoadMeterRules(options, enabledMetricsSection,
MeterScope
.Global |
MeterScope
.Local, listenerName);
57
LoadMeterRules(options, enabledGlobalMetricsSection,
MeterScope
.Global, listenerName);
62
LoadMeterRules(options, enabledLocalMetricsSection,
MeterScope
.Local, listenerName);
69
internal static void LoadMeterRules(MetricsOptions options, IConfigurationSection configurationSection,
MeterScope
scopes, string? listenerName)
95
internal static void LoadInstrumentRules(MetricsOptions options, IConfigurationSection meterSection,
MeterScope
scopes, string? listenerName)
Metrics\ListenerSubscription.cs (10)
161
if (!(rule.Scopes.HasFlag(
MeterScope
.Global) && instrument.Meter.Scope == null)
162
&& !(rule.Scopes.HasFlag(
MeterScope
.Local) && instrument.Meter.Scope == meterFactory))
258
if (!rule.Scopes.HasFlag(
MeterScope
.Global) && best.Scopes.HasFlag(
MeterScope
.Global))
262
else if (rule.Scopes.HasFlag(
MeterScope
.Global) && !best.Scopes.HasFlag(
MeterScope
.Global))
271
if (!rule.Scopes.HasFlag(
MeterScope
.Local) && best.Scopes.HasFlag(
MeterScope
.Local))
275
else if (rule.Scopes.HasFlag(
MeterScope
.Local) && !best.Scopes.HasFlag(
MeterScope
.Local))
Microsoft.Extensions.Diagnostics.Abstractions (19)
Metrics\InstrumentRule.cs (6)
25
public class InstrumentRule(string? meterName, string? instrumentName, string? listenerName,
MeterScope
scopes, bool enable)
52
/// Gets the <see cref="
MeterScope
"/>.
55
/// This property is used to distinguish between meters created via <see cref="Meter"/> constructors (<see cref="
MeterScope
.Global"/>)
56
/// and those created via Dependency Injection with <see cref="IMeterFactory.Create(MeterOptions)"/> (<see cref="
MeterScope
.Local"/>).
58
public
MeterScope
Scopes { get; } = scopes ==
MeterScope
.None
Metrics\MetricsBuilderExtensions.Rules.cs (13)
34
MeterScope
scopes =
MeterScope
.Global |
MeterScope
.Local)
56
MeterScope
scopes =
MeterScope
.Global |
MeterScope
.Local)
78
MeterScope
scopes =
MeterScope
.Global |
MeterScope
.Local)
100
MeterScope
scopes =
MeterScope
.Global |
MeterScope
.Local)
111
MeterScope
scopes, bool enable)