29 references to MetricsOptions
Microsoft.Extensions.Diagnostics (10)
Metrics\Configuration\MetricsBuilderConfigurationExtensions.cs (3)
37
builder.Services.AddSingleton<IConfigureOptions<
MetricsOptions
>>(new MetricsConfigureOptions(configuration));
38
builder.Services.AddSingleton<IOptionsChangeTokenSource<
MetricsOptions
>>(new ConfigurationChangeTokenSource<
MetricsOptions
>(configuration));
Metrics\Configuration\MetricsConfigureOptions.cs (5)
11
internal sealed class MetricsConfigureOptions : IConfigureOptions<
MetricsOptions
>
24
public void Configure(
MetricsOptions
options) => LoadConfig(options);
26
private void LoadConfig(
MetricsOptions
options)
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\MetricsSubscriptionManager.cs (2)
18
public MetricsSubscriptionManager(IEnumerable<IMetricsListener> listeners, IOptionsMonitor<
MetricsOptions
> options, IMeterFactory meterFactory)
38
private void UpdateRules(
MetricsOptions
options)
Microsoft.Extensions.Diagnostics.Abstractions (19)
Metrics\MetricsBuilderExtensions.Rules.cs (19)
40
/// <param name="options">The <see cref="
MetricsOptions
"/>.</param>
42
/// <returns>The original <see cref="
MetricsOptions
"/> for chaining.</returns>
43
public static
MetricsOptions
EnableMetrics(this
MetricsOptions
options, string? meterName)
49
/// <param name="options">The <see cref="
MetricsOptions
"/>.</param>
54
/// <returns>The original <see cref="
MetricsOptions
"/> for chaining.</returns>
55
public static
MetricsOptions
EnableMetrics(this
MetricsOptions
options, string? meterName, string? instrumentName = null, string? listenerName = null,
84
/// <param name="options">The <see cref="
MetricsOptions
"/>.</param>
86
/// <returns>The original <see cref="
MetricsOptions
"/> for chaining.</returns>
87
public static
MetricsOptions
DisableMetrics(this
MetricsOptions
options, string? meterName)
93
/// <param name="options">The <see cref="
MetricsOptions
"/>.</param>
98
/// <returns>The original <see cref="
MetricsOptions
"/> for chaining.</returns>
99
public static
MetricsOptions
DisableMetrics(this
MetricsOptions
options, string? meterName, string? instrumentName = null, string? listenerName = null,
103
private static IMetricsBuilder ConfigureRule(this IMetricsBuilder builder, Action<
MetricsOptions
> configureOptions)
110
private static
MetricsOptions
AddRule(this
MetricsOptions
options, string? meterName, string? instrumentName, string? listenerName,