Skip to content
Tracon

TraconHealthCheckExtensions

Namespace Tracon · Assembly Tracon.AspNetCore.dll

Extensions that connect Tracon to the standard.NET health check system.

public static class TraconHealthCheckExtensions

objectTraconHealthCheckExtensions

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

AddTraconHealthChecks(IHealthChecksBuilder, string, IEnumerable<string>?)

Section titled “ AddTraconHealthChecks(IHealthChecksBuilder, string, IEnumerable<string>?)”

Registers the Tracon health check. The consumer sets up its own /health path.

public static IHealthChecksBuilder AddTraconHealthChecks(this IHealthChecksBuilder builder, string name = "tracon", IEnumerable<string>? tags = null)

builder IHealthChecksBuilder

The health checks builder.

name string

The name of the check. Default is tracon.

tags IEnumerable<string>?

Tags to add to the check. Example: readiness/liveness separation.

IHealthChecksBuilder

The builder, for chaining.

Tracon does not call MapHealthChecks — taking over the consumer’s path choice would break the no-surprises rule. Setup:

builder.Services.AddHealthChecks().AddTraconHealthChecks();
app.MapHealthChecks("/health");

The check reads TraconDiagnosticsCollector; it produces no model call. For the three states, see Tracon.TraconHealthCheck.

This call only adds a service registration; whether AddTracon is called before or after it does not matter (DI registration is order-independent). However, if AddTracon is never called, TraconDiagnosticsCollector cannot be resolved on the first /health probe and DI raises a clear error.

ArgumentNullException

builder is null.

ArgumentException

name is empty.