AgentPrismHealthCheckExtensions
AgentPrism.AspNetCore.dllExtensions that connect AgentPrism to the standard.NET health check system.
public static class AgentPrismHealthCheckExtensionsInheritance
Section titled “Inheritance”object ← AgentPrismHealthCheckExtensions
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”AddAgentPrismHealthChecks(IHealthChecksBuilder, string, IEnumerable<string>?)
Section titled “ AddAgentPrismHealthChecks(IHealthChecksBuilder, string, IEnumerable<string>?)”Registers the AgentPrism health check. The consumer sets up its own /health path.
public static IHealthChecksBuilder AddAgentPrismHealthChecks(this IHealthChecksBuilder builder, string name = "agentprism", IEnumerable<string>? tags = null)Parameters
Section titled “Parameters”builder IHealthChecksBuilder
The health checks builder.
name string
The name of the check. Default is agentprism.
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”AgentPrism does not call MapHealthChecks — seizing the consumer’s path
choice would force the no-surprises rule. Setup:
builder.Services.AddHealthChecks().AddAgentPrismHealthChecks();app.MapHealthChecks("/health");The check reads AgentPrismDiagnosticsCollector; it produces no model call. For the three states, see AgentPrism.AgentPrismHealthCheck.
This call only adds a service registration; whether AddAgentPrism is
called before or after it does not matter (DI registration is order-independent).
However, if AddAgentPrism is never called, AgentPrismDiagnosticsCollector
cannot be resolved on the first /health probe and DI raises a clear error.
Exceptions
Section titled “Exceptions”builder is null.
name is empty.