CommonHealthChecksExtensions.AddTelemetryHealthCheckPublisher Method

Definition

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)

Source:
CommonHealthChecksExtensions.TelemetryPublisher.cs

Registers a health check publisher which emits telemetry representing the application's health.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTelemetryHealthCheckPublisher(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Parameters

services
IServiceCollection

The dependency injection container to add the publisher to.

Returns

The value of services.

Exceptions

services is null.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddTelemetryHealthCheckPublisher(IServiceCollection, IConfigurationSection)

Source:
CommonHealthChecksExtensions.TelemetryPublisher.cs

Registers a health check publisher which emits telemetry representing the application's health.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTelemetryHealthCheckPublisher(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);

Parameters

services
IServiceCollection

The dependency injection container to add the publisher to.

Returns

The value of services.

Exceptions

services or section is null.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddTelemetryHealthCheckPublisher(IServiceCollection, Action<TelemetryHealthCheckPublisherOptions>)

Source:
CommonHealthChecksExtensions.TelemetryPublisher.cs

Registers a health check publisher which emits telemetry representing the application's health.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTelemetryHealthCheckPublisher(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.HealthChecks.TelemetryHealthCheckPublisherOptions> configure);

Parameters

services
IServiceCollection

The dependency injection container to add the publisher to.

Returns

The value of services.

Exceptions

services or configure is null.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)