RequestLatencyTelemetryExtensions.AddRequestLatencyTelemetry 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddRequestLatencyTelemetry(IServiceCollection)
将请求延迟遥测中间件添加到指定的 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
参数
- services
- IServiceCollection
要添加到的 IServiceCollection。
返回
添加了请求延迟遥测中间件的服务集合。
例外
services
为 null
。
适用于
AddRequestLatencyTelemetry(IServiceCollection, IConfigurationSection)
将请求延迟遥测中间件添加到指定的 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
参数
- services
- IServiceCollection
要添加到的 IServiceCollection。
- section
- IConfigurationSection
返回
添加了请求延迟遥测中间件的服务集合。
例外
services
或 section
为 null
。
适用于
AddRequestLatencyTelemetry(IServiceCollection, Action<RequestLatencyTelemetryOptions>)
将请求延迟遥测中间件添加到指定的 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
参数
- services
- IServiceCollection
要添加到的 IServiceCollection。
- configure
- Action<RequestLatencyTelemetryOptions>
返回
添加了请求延迟遥测中间件的服务集合。
例外
services
或 configure
为 null
。