Skip to content

SLOGo

Go utilities for working with OpenSLO (Service Level Objectives) specifications.

Go Report Card GoDoc License

Overview

slogo is a Go library that provides convenient utilities for reading, writing, and validating OpenSLO specification files. It builds on top of the OpenSLO Go SDK to provide a simpler interface for working with SLO definitions in JSON and YAML formats.

Features

  • 📖 Read OpenSLO objects from files or readers (auto-detects JSON/YAML format)
  • 📝 Write OpenSLO objects to files in JSON or YAML format
  • ✅ Validate SLO definitions against the OpenSLO specification
  • 🔒 Type-safe Go representations of SLO objects
  • 🏷️ Predefined severity and attribute constants
  • 📊 Comprehensive SLO ontology for metric labeling and categorization
  • 🚀 Production-ready examples for RED, USE, AI Agents, and SaaS metrics

Quick Start

go get github.com/grokify/slogo
import "github.com/grokify/slogo"

// Read from file (auto-detects JSON or YAML)
objs, err := slogo.ReadFile("slo-definition.yaml")
if err != nil {
    log.Fatal(err)
}

// Validate all objects
if err := objs.Validate(); err != nil {
    log.Fatal(err)
}

What's Included

Ontology System

A comprehensive labeling system for organizing SLOs across multiple dimensions:

  • 🔧 Frameworks: RED, USE, Custom
  • 📦 Layers: Service, Infrastructure, Business, Application
  • 🎯 Scopes: Customer-facing, Internal, Business-outcome
  • 👥 Audiences: SRE, Engineering, Product, Executive
  • 📊 Categories: Availability, Latency, Throughput, Quality
  • 📈 Metric Types: Rate, Errors, Duration, Retention, Stickiness

Production-Ready Examples

64 SLOs across 6 example sets:

Example Set SLOs Description
RED Metrics 5 Rate, Errors, Duration for services
USE Metrics 11 Utilization, Saturation, Errors for infrastructure
AI Agents 20 Quality, performance, cost efficiency
SaaS CRM 25 User journey from activation to retention
Budgeting Methods 3 Occurrences vs Timeslices comparison

Domain Ontologies

Opt-in domain packages for specialized use cases:

  • IAM - Identity & Access Management
  • Product - AARRR journey stages
  • Business - Industry verticals
  • Security - Risk and threat classification
  • Compliance - Regulatory frameworks
  • Operations - Incident response, SRE

Resources

OpenSLO

SRE & Monitoring Methodologies

Product & Business Metrics