feat(health): EventStore latency + llama-server liveness probes
- EventStoreLatencyProbe: times a side-effect-free lastGlobalSequence read, wired into HealthMonitor; HealthConfig.eventStoreWarnLatencyMs (BACKLOG A §4) - LlamaServerHealthProbe: liveness + tokens/sec degradation trend, injectable client (HttpLlamaLivenessClient over Ktor); deterministic unit tests - llama probe left unregistered (TODO) — HttpClient not in monitor scope yet Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,9 @@ data class CorrexConfig(
|
||||
* Continuous health watch (observability-spec §4). When [enabled], a background monitor polls
|
||||
* the on-disk footprint every [intervalMs] and records a degraded/restored event on the edge.
|
||||
* [diskWarnBytes] is the absolute event-log + CAS size that trips a warning; [diskWarnGrowthBytesPerMin]
|
||||
* is the growth rate that warns log compaction is becoming non-theoretical. Defaults suit a homelab.
|
||||
* is the growth rate that warns log compaction is becoming non-theoretical. [eventStoreWarnLatencyMs]
|
||||
* is the event-store latency watermark: a single side-effect-free store read slower than this trips a
|
||||
* warning that the append/fsync path is contended or the disk is failing. Defaults suit a homelab.
|
||||
*/
|
||||
@Serializable
|
||||
data class HealthConfig(
|
||||
@@ -31,6 +33,7 @@ data class HealthConfig(
|
||||
val intervalMs: Long = 30_000,
|
||||
val diskWarnBytes: Long = 5_000_000_000,
|
||||
val diskWarnGrowthBytesPerMin: Long = 50_000_000,
|
||||
val eventStoreWarnLatencyMs: Long = 250,
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user