Table of Contents

Class HealthCheckExtensions

Namespace
ProjectTemplate.Web.Extensions
Assembly
ProjectTemplate.Web.dll

Provides extension methods for registering and mapping application health check endpoints.

public static class HealthCheckExtensions
Inheritance
HealthCheckExtensions
Inherited Members

Methods

AddApplicationHealthChecks(IServiceCollection)

Registers baseline ASP.NET Core health check services.

public static IServiceCollection AddApplicationHealthChecks(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection used to register health checks.

Returns

IServiceCollection

The original IServiceCollection for chaining.

MapApplicationHealthChecks(WebApplication)

Maps baseline health check endpoints for infrastructure, reverse proxies, and hosting platforms.

public static WebApplication MapApplicationHealthChecks(this WebApplication app)

Parameters

app WebApplication

The web application used to map health check endpoints.

Returns

WebApplication

The original WebApplication for chaining.

Remarks

/health/ready runs only checks tagged Ready, and /health/audit-integrity runs only checks tagged Audit. Audit integrity is reported separately so an integrity finding alerts operators without removing every replica from rotation.