.NET API
TraconHealthCheckExtensions
Tracon.AspNetCore.dllExtensions that connect Tracon to the standard.NET health check system.
public static class TraconHealthCheckExtensionsInheritance
Section titled “Inheritance”object ← TraconHealthCheckExtensions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Section titled “Methods”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)Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”The builder, for chaining.
Remarks
Section titled “Remarks”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.
Exceptions
Section titled “Exceptions”builder is null.
name is empty.