RequestLatencyTelemetryExtensions.AddRequestLatencyTelemetry Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddRequestLatencyTelemetry(IServiceCollection) |
Adds request latency telemetry middleware to the specified IServiceCollection. |
AddRequestLatencyTelemetry(IServiceCollection, IConfigurationSection) |
Adds request latency telemetry middleware to the specified IServiceCollection. |
AddRequestLatencyTelemetry(IServiceCollection, Action<RequestLatencyTelemetryOptions>) |
Adds request latency telemetry middleware to the specified IServiceCollection. |
AddRequestLatencyTelemetry(IServiceCollection)
Adds request latency telemetry middleware to the specified IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestLatencyTelemetry (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddRequestLatencyTelemetry : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRequestLatencyTelemetry (services As IServiceCollection) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to add to.
Returns
Provided service collection with request latency telemetry middleware added.
Exceptions
services
is null
.
Applies to
AddRequestLatencyTelemetry(IServiceCollection, IConfigurationSection)
Adds request latency telemetry middleware to the specified IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestLatencyTelemetry (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddRequestLatencyTelemetry : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRequestLatencyTelemetry (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to add to.
- section
- IConfigurationSection
Configuration of RequestLatencyTelemetryOptions.
Returns
Provided service collection with request latency telemetry middleware added.
Exceptions
Either services
or section
is null
.
Applies to
AddRequestLatencyTelemetry(IServiceCollection, Action<RequestLatencyTelemetryOptions>)
Adds request latency telemetry middleware to the specified IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestLatencyTelemetry (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Telemetry.RequestLatencyTelemetryOptions> configure);
static member AddRequestLatencyTelemetry : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Telemetry.RequestLatencyTelemetryOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRequestLatencyTelemetry (services As IServiceCollection, configure As Action(Of RequestLatencyTelemetryOptions)) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to add to.
- configure
- Action<RequestLatencyTelemetryOptions>
Configuration of RequestLatencyTelemetryOptions.
Returns
Provided service collection with request latency telemetry middleware added.
Exceptions
Either services
or configure
is null
.