Creates a new health service.
Runtime services for time and diagnostics
Optionaloptions: {Aggregation options
OptionalindicatorTimeoutMs?: numberPer-indicator deadline in ms (default 5,000). Must be a positive finite number.
Optionalreadiness?: { exclude?: readonly string[]; include?: readonly string[] }Operator overrides of readiness membership by indicator name, applied to every registration (since 0.11.0)
Optional Readonlyexclude?: readonly string[]Force these indicators out of readiness.
Optional Readonlyinclude?: readonly string[]Force these indicators into readiness.
Runs all registered indicators and returns the aggregated report.
The full health report
Runs only the liveness indicator (the built-in "self" indicator).
The liveness report
Runs readiness members, excluding the built-in "self" indicator.
The readiness report
Registers a health indicator.
Indicator name (must be unique; throws on duplicate)
Health check function
Optionaloptions: HealthIndicatorOptions
Readiness membership; absent means included
Default implementation of
IHealthService.Manages indicator registration and aggregation for health checks.
M90b: selected indicators run CONCURRENTLY, each raced against a runtime-owned deadline (
indicatorTimeoutMs, default 5,000). Sequential awaiting multiplied outage latency — a 2-second outage across six dependency indicators took 12+ seconds, the measured X29-2/health— and one never-settling indicator left the whole endpoint pending forever. A timeout is recorded as{ status: 'down', data: { reason: 'timeout' } }, a rejection as{ status: 'down', data: { reason: 'error' } }with the thrown value never serialized into the report, and a result that is not a framework result — not an object, or astatusoutsideup/degraded/down— as{ status: 'down', data: { reason: 'invalid-result' } }, so an unrecognized status can never mask another indicator'sdown; each indicator's latency is measured individually; andchecksis assembled in registration order so the report's shape is stable even though execution is not.Since
0.2.0