Package com.tnsai.quality.slo
package com.tnsai.quality.slo
-
ClassDescriptionMulti-window burn-rate alerting thresholds (issue #92), per the SRE workbook recipe — a single burn-rate signal is too noisy on its own, so the framework requires a fast-window AND a slow-window signal to fire before treating an SLO as actively burning.Burn-rate sample for one
SLOState(issue #92): how fast is the error budget being consumed in the short and long windows?What an SLO-aware enforcement layer should do when the budget is exhausted (issue #92).Disable a specific feature flag for the duration of the exhaustion.Just alert; let traffic through unchanged.Reject new work outright (with a structured reason) until the budget recovers.Switch the agent to a cheaper / simpler LLM target identified by its provider qualifier (e.g.Drop the configured fraction of low-priority requests.Per-attempt scope description fed toSLOScope.matches(EventScope).Process-localSLOEvaluatorthat holds attempt records in an in-memory rolling buffer (issue #92).One observed attempt feeding the SLO calculation.Declarative definition of one Service Level Objective (issue #92).Computes the currentSLOStatefor a givenSLODefinition(issue #92).In-memory store ofSLODefinitions, looked up by id (issue #92).What anSLODefinitionmeasures (issue #92): the framework as a whole, a single tenant, a specific agent inside a tenant, or every implementation of aCapabilityinterface.Single-agent-within-tenant scope.Every implementation of a capability interface — useful for cross-tenant SLOs like "all chat agents must hit p95 invalid input: '<' 3s".Single-tenant scope.Whole-framework scope — every event counts.Point-in-time snapshot of an SLO's health, produced bySLOEvaluator.evaluate(SLODefinition, Instant)(issue #92).Coarse-grained health bucket for anSLOState(issue #92).What kind of metric an SLO measures (issue #92).Numeric target an SLO must hold (issue #92).Direction of comparison between observed value and target.