HttpClientLatencyTelemetryExtensions.AddHttpClientLatencyTelemetry 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddHttpClientLatencyTelemetry(IServiceCollection) |
新增 以 DelegatingHandler 收集延遲資訊,並擴充所有 HTTP 用戶端的傳出要求記錄。 |
AddHttpClientLatencyTelemetry(IServiceCollection, IConfigurationSection) |
新增 以 DelegatingHandler 收集延遲資訊,並擴充所有 HTTP 用戶端的傳出要求記錄。 |
AddHttpClientLatencyTelemetry(IServiceCollection, Action<HttpClientLatencyTelemetryOptions>) |
新增 以 DelegatingHandler 收集延遲資訊,並擴充所有 HTTP 用戶端的傳出要求記錄。 |
AddHttpClientLatencyTelemetry(IServiceCollection)
新增 以 DelegatingHandler 收集延遲資訊,並擴充所有 HTTP 用戶端的傳出要求記錄。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddHttpClientLatencyTelemetry(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClientLatencyTelemetry (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHttpClientLatencyTelemetry : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpClientLatencyTelemetry (services As IServiceCollection) As IServiceCollection
參數
- services
- IServiceCollection
傳回
services
的值。
備註
此延伸模組會全域設定所有 HTTP 用戶端的延遲資訊集合。
適用於
AddHttpClientLatencyTelemetry(IServiceCollection, IConfigurationSection)
新增 以 DelegatingHandler 收集延遲資訊,並擴充所有 HTTP 用戶端的傳出要求記錄。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddHttpClientLatencyTelemetry(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClientLatencyTelemetry (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddHttpClientLatencyTelemetry : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpClientLatencyTelemetry (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
參數
- services
- IServiceCollection
傳回
services
的值。
備註
此延伸模組會針對所有 HTTP 用戶端設定全域自動收集傳出要求記錄。
適用於
AddHttpClientLatencyTelemetry(IServiceCollection, Action<HttpClientLatencyTelemetryOptions>)
新增 以 DelegatingHandler 收集延遲資訊,並擴充所有 HTTP 用戶端的傳出要求記錄。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddHttpClientLatencyTelemetry(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Http::Latency::HttpClientLatencyTelemetryOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClientLatencyTelemetry (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Http.Latency.HttpClientLatencyTelemetryOptions> configure);
static member AddHttpClientLatencyTelemetry : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Http.Latency.HttpClientLatencyTelemetryOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpClientLatencyTelemetry (services As IServiceCollection, configure As Action(Of HttpClientLatencyTelemetryOptions)) As IServiceCollection
參數
- services
- IServiceCollection
- configure
- Action<HttpClientLatencyTelemetryOptions>
要設定的 HttpClientLatencyTelemetryOptions 委派。
傳回
services
的值。
備註
此延伸模組會針對所有 HTTP 用戶端設定全域自動收集傳出要求記錄。