52 references to IMetricsBuilder
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
352
public
IMetricsBuilder
Metrics => _hostApplicationBuilder.Metrics;
Microsoft.Extensions.Diagnostics (10)
Metrics\Configuration\MetricsBuilderConfigurationExtensions.cs (5)
14
/// Extensions for <see cref="
IMetricsBuilder
"/> for enabling metrics based on <see cref="IConfiguration"/>.
22
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
24
/// <returns>The original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
25
public static
IMetricsBuilder
AddConfiguration(this
IMetricsBuilder
builder, IConfiguration configuration)
Metrics\MetricsBuilderConsoleExtensions.cs (2)
16
public static
IMetricsBuilder
AddDebugConsole(this
IMetricsBuilder
builder) => builder.AddListener<DebugConsoleMetricListener>();
Metrics\MetricsServiceExtensions.cs (3)
49
/// <param name="configure">A callback to configure the <see cref="
IMetricsBuilder
"/>.</param>
51
public static IServiceCollection AddMetrics(this IServiceCollection services, Action<
IMetricsBuilder
> configure)
66
private sealed class MetricsBuilder(IServiceCollection services) :
IMetricsBuilder
Microsoft.Extensions.Diagnostics.Abstractions (32)
Metrics\MetricsBuilderExtensions.Listeners.cs (13)
12
/// Extension methods for <see cref="
IMetricsBuilder
"/> to add or clear <see cref="IMetricsListener"/> registrations, and to enable or disable metrics.
20
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
21
/// <returns>Returns the original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
22
public static
IMetricsBuilder
AddListener<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(this
IMetricsBuilder
builder) where T : class, IMetricsListener
33
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
34
/// <returns>Returns the original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
35
public static
IMetricsBuilder
AddListener(this
IMetricsBuilder
builder, IMetricsListener listener)
45
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
46
/// <returns>Returns the original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
47
public static
IMetricsBuilder
ClearListeners(this
IMetricsBuilder
builder)
Metrics\MetricsBuilderExtensions.Rules.cs (19)
11
/// Extension methods for <see cref="
IMetricsBuilder
"/> to add or clear <see cref="IMetricsListener"/> registrations, and to enable or disable metrics.
18
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
20
/// <returns>The original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
21
public static
IMetricsBuilder
EnableMetrics(this
IMetricsBuilder
builder, string? meterName)
27
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
32
/// <returns>The original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
33
public static
IMetricsBuilder
EnableMetrics(this
IMetricsBuilder
builder, string? meterName, string? instrumentName = null, string? listenerName = null,
62
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
64
/// <returns>The original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
65
public static
IMetricsBuilder
DisableMetrics(this
IMetricsBuilder
builder, string? meterName)
71
/// <param name="builder">The <see cref="
IMetricsBuilder
"/>.</param>
76
/// <returns>The original <see cref="
IMetricsBuilder
"/> for chaining.</returns>
77
public static
IMetricsBuilder
DisableMetrics(this
IMetricsBuilder
builder, string? meterName, string? instrumentName = null, string? listenerName = null,
103
private static
IMetricsBuilder
ConfigureRule(this
IMetricsBuilder
builder, Action<MetricsOptions> configureOptions)
Microsoft.Extensions.Hosting (8)
HostApplicationBuilder.cs (2)
210
public
IMetricsBuilder
Metrics => _metrics;
404
private sealed class MetricsBuilder(IServiceCollection services) :
IMetricsBuilder
HostingHostBuilderExtensions.cs (6)
402
/// Adds a delegate for configuring the provided <see cref="
IMetricsBuilder
"/>. This can be called multiple times.
405
/// <param name="configureMetrics">The delegate that configures the <see cref="
IMetricsBuilder
"/>.</param>
407
public static IHostBuilder ConfigureMetrics(this IHostBuilder hostBuilder, Action<
IMetricsBuilder
> configureMetrics)
413
/// Adds a delegate for configuring the provided <see cref="
IMetricsBuilder
"/>. This can be called multiple times.
416
/// <param name="configureMetrics">The delegate that configures the <see cref="
IMetricsBuilder
"/>.</param>
418
public static IHostBuilder ConfigureMetrics(this IHostBuilder hostBuilder, Action<HostBuilderContext,
IMetricsBuilder
> configureMetrics)
Microsoft.Extensions.Hosting.Abstractions (1)
IHostApplicationBuilder.cs (1)
44
IMetricsBuilder
Metrics { get; }