39 references to MeterScope
Microsoft.Extensions.Diagnostics (20)
Metrics\Configuration\MetricsConfigureOptions.cs (10)
33LoadMeterRules(options, configurationSection, MeterScope.Global | MeterScope.Local, null); 38LoadMeterRules(options, configurationSection, MeterScope.Global, null); 43LoadMeterRules(options, configurationSection, MeterScope.Local, null); 52LoadMeterRules(options, enabledMetricsSection, MeterScope.Global | MeterScope.Local, listenerName); 57LoadMeterRules(options, enabledGlobalMetricsSection, MeterScope.Global, listenerName); 62LoadMeterRules(options, enabledLocalMetricsSection, MeterScope.Local, listenerName); 69internal static void LoadMeterRules(MetricsOptions options, IConfigurationSection configurationSection, MeterScope scopes, string? listenerName) 95internal static void LoadInstrumentRules(MetricsOptions options, IConfigurationSection meterSection, MeterScope scopes, string? listenerName)
Metrics\ListenerSubscription.cs (10)
161if (!(rule.Scopes.HasFlag(MeterScope.Global) && instrument.Meter.Scope == null) 162&& !(rule.Scopes.HasFlag(MeterScope.Local) && instrument.Meter.Scope == meterFactory)) 258if (!rule.Scopes.HasFlag(MeterScope.Global) && best.Scopes.HasFlag(MeterScope.Global)) 262else if (rule.Scopes.HasFlag(MeterScope.Global) && !best.Scopes.HasFlag(MeterScope.Global)) 271if (!rule.Scopes.HasFlag(MeterScope.Local) && best.Scopes.HasFlag(MeterScope.Local)) 275else if (rule.Scopes.HasFlag(MeterScope.Local) && !best.Scopes.HasFlag(MeterScope.Local))
Microsoft.Extensions.Diagnostics.Abstractions (19)
Metrics\InstrumentRule.cs (6)
25public 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"/>). 58public MeterScope Scopes { get; } = scopes == MeterScope.None
Metrics\MetricsBuilderExtensions.Rules.cs (13)
34MeterScope scopes = MeterScope.Global | MeterScope.Local) 56MeterScope scopes = MeterScope.Global | MeterScope.Local) 78MeterScope scopes = MeterScope.Global | MeterScope.Local) 100MeterScope scopes = MeterScope.Global | MeterScope.Local) 111MeterScope scopes, bool enable)