Skip to main content
This document defines the Service Level Indicators (SLIs), Service Level Objectives (SLOs), and error budget policies for the KaireonAI Next-Best-Action platform.

1. SLO Summary

These SLO targets are recommended starting points for operators to adopt and tune — the platform does not enforce or auto-measure them out of the box.The PromQL below is illustrative. The platform emits its metrics under the kaireon_ prefix (see Metrics Reference), so map the example series to the real ones before wiring alerts:
  • Total request count / error rate — there is no http_responses_total series. Use kaireon_http_error_total{status_class="5xx"} for 5xx counts and the histogram counter kaireon_http_request_duration_seconds_count for total requests.
  • Decision latency — use kaireon_http_request_duration_seconds_bucket (filtered to route="/api/v1/recommend") or the dedicated kaireon_decision_latency_ms histogram.
  • Pipeline success — the platform does not emit a pipeline_runs_total success/failure counter. Derive this SLI from the pipeline-runs table (or add your own instrumentation); kaireon_pipeline_execution_latency_ms only counts executions, not outcomes.

2. SLI Definitions

2.1 Availability

Definition: The proportion of valid HTTP requests that return a non-5xx response code, measured at the load balancer (ALB/Ingress). Includes: All requests to /api/v1/* endpoints and the Next.js frontend. Excludes: Health check probes (/api/health, /api/ready), synthetic monitoring requests. Formula:
Error budget: At 99.9% over 30 days, the platform tolerates approximately 43 minutes of total downtime or equivalent partial degradation per month.

2.2 Decision Latency

Definition: Server-side duration from request receipt to response write for the decision endpoint (/api/v1/recommend). Measurement point: The kaireon_http_request_duration_seconds histogram emitted by the app’s withMetrics wrapper (labels method, route, status), scraped at GET /api/metrics. Formulas:

2.3 API Error Rate

Definition: The proportion of all API responses that return a 5xx status code. Formula:

2.4 Pipeline Success Rate

Definition: The proportion of pipeline executions that complete without error, measured from the pipeline orchestrator. Formula:

3. Prometheus Alerting Rules


4. Error Budget Policy

4.1 Budget Calculation

Each SLO has an associated error budget equal to 1 - SLO target over the measurement window.

4.2 Budget States

4.3 Budget Exhaustion Protocol

When the error budget for any SLO is fully exhausted within the measurement window:
  1. Immediate: Halt all non-emergency deployments to production.
  2. Within 1 hour: Conduct a rapid incident review to identify contributing factors.
  3. Within 24 hours: Publish a brief written analysis with remediation items.
  4. Ongoing: Reliability improvements take priority until budget recovers above 25%.
  5. Exception: Security patches and data-loss-prevention fixes are always permitted.

5. Escalation Procedures

5.1 Severity Levels

5.2 Escalation Chain

5.3 Communication


6. Dashboards

Maintain the following Grafana dashboards to track SLO health:

7. Review Cadence

  • Weekly: Review SLO dashboards in team standup. Note any yellow/orange states.
  • Monthly: Publish SLO report to stakeholders. Adjust targets if consistently over- or under-performing.
  • Quarterly: Evaluate whether SLO targets remain appropriate for current business needs. Propose revisions through the architecture review process.