Parapet.SLO (parapet v1.0.0)

Copy Markdown View Source

Defines a Service-Level Objective (SLO) within Parapet.

Experimental

This module is experimental in v1.x. Its API may change in a minor release with a single-version notice in CHANGELOG.md. See Stability & Deprecation Policy for details.

Summary

Functions

Returns all registered SLOs.

define(name, opts) deprecated

Defines a new SLO and stores it in the application registry.

Types

t()

@type t() :: %Parapet.SLO{
  good_events: String.t(),
  name: atom(),
  objective: float(),
  runbook: String.t(),
  total_events: String.t()
}

Functions

all()

Returns all registered SLOs.

define(name, opts)

This function is deprecated. Use a Parapet.SLO.Provider module instead.

Defines a new SLO and stores it in the application registry.

Options

  • :objective - The target objective percentage (e.g., 99.9).
  • :good_events - PromQL string for good events.
  • :total_events - PromQL string for total events.
  • :runbook - URL to the runbook for this SLO.

Raises ArgumentError if required fields are missing.

legacy()

provider_catalog()

provider_slos()