health
Completed persistence turns and unresolved failures, independent of outage logging. Includes a configured clock's write as part of export/clear, not a second acknowledgement. A turn that skips the clock's write, because its read has not landed, counts per work key instead: its span work as the span write went, and its clock work as one failed turn that only a later clock write resolves (#3426). So does an export that wanted a dot from an exhausted clock (ClockTick.Exhausted) and saved its span unstamped, though its clock write lands; the turn that mints the last dot, a clear, and a span with its own stamp want no dot they cannot get, so they are not counted, and their clock write resolves those failures. Recovery covers the span buffer; WarpTelemetry.recover also reports its clock's recovery.
Samples
val telemetry = WarpTelemetry(ReplicaId("device"), InMemoryDurableStore())
telemetry.recover()
telemetry.metrics.incrementSum(MetricKey("requests", MetricKind.SUM))
val health = telemetry.health
check(health.metrics.acknowledged == 1L)
check(health.metrics.outstandingFailures == 0L)
check(!health.metrics.recoveryFailed)
// Logs keep record units. No log records have been admitted by this instance.
check(health.logs.accepted == 0L)
check(health.spans.acknowledged == 0L)