CommonHealthChecksExtensions.AddTelemetryHealthCheckPublisher 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
AddTelemetryHealthCheckPublisher(IServiceCollection) |
Registers a health check publisher which emits telemetry representing the application's health. |
AddTelemetryHealthCheckPublisher(IServiceCollection, IConfigurationSection) |
Registers a health check publisher which emits telemetry representing the application's health. |
AddTelemetryHealthCheckPublisher(IServiceCollection, Action<TelemetryHealthCheckPublisherOptions>) |
Registers a health check publisher which emits telemetry representing the application's health. |
AddTelemetryHealthCheckPublisher(IServiceCollection)
Registers a health check publisher which emits telemetry representing the application's health.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTelemetryHealthCheckPublisher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTelemetryHealthCheckPublisher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddTelemetryHealthCheckPublisher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTelemetryHealthCheckPublisher (services As IServiceCollection) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container to add the publisher to.
Returns
The value of services
.
Exceptions
services
is null
.
Applies to
AddTelemetryHealthCheckPublisher(IServiceCollection, IConfigurationSection)
Registers a health check publisher which emits telemetry representing the application's health.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTelemetryHealthCheckPublisher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTelemetryHealthCheckPublisher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddTelemetryHealthCheckPublisher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTelemetryHealthCheckPublisher (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container to add the publisher to.
- section
- IConfigurationSection
Configuration for TelemetryHealthCheckPublisherOptions.
Returns
The value of services
.
Exceptions
services
or section
is null
.
Applies to
AddTelemetryHealthCheckPublisher(IServiceCollection, Action<TelemetryHealthCheckPublisherOptions>)
Registers a health check publisher which emits telemetry representing the application's health.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTelemetryHealthCheckPublisher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::HealthChecks::TelemetryHealthCheckPublisherOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTelemetryHealthCheckPublisher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.HealthChecks.TelemetryHealthCheckPublisherOptions> configure);
static member AddTelemetryHealthCheckPublisher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.HealthChecks.TelemetryHealthCheckPublisherOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTelemetryHealthCheckPublisher (services As IServiceCollection, configure As Action(Of TelemetryHealthCheckPublisherOptions)) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container to add the publisher to.
- configure
- Action<TelemetryHealthCheckPublisherOptions>
Configuration for TelemetryHealthCheckPublisherOptions.
Returns
The value of services
.
Exceptions
services
or configure
is null
.