Share via


MetricsServiceExtensions.AddMetrics Method

Definition

Overloads

AddMetrics(IServiceCollection)

Adds metrics services to the specified IServiceCollection.

AddMetrics(IServiceCollection, Action<IMetricsBuilder>)

Adds metrics services to the specified IServiceCollection.

AddMetrics(IServiceCollection)

Source:
MetricsServiceExtensions.cs
Source:
MetricsServiceExtensions.cs

Adds metrics services to the specified IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddMetrics(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMetrics (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddMetrics : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddMetrics (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add services to.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to

AddMetrics(IServiceCollection, Action<IMetricsBuilder>)

Source:
MetricsServiceExtensions.cs
Source:
MetricsServiceExtensions.cs

Adds metrics services to the specified IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddMetrics(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMetrics (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder> configure);
static member AddMetrics : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddMetrics (services As IServiceCollection, configure As Action(Of IMetricsBuilder)) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add services to.

configure
Action<IMetricsBuilder>

A callback to configure the IMetricsBuilder.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to