probeSLO

slo_has_enough_remaining_budget

Verifies that an SLO has enough error budget left

Activity as code

Below are the details and signature of the activity Python module.

Typeprobe
Modulechaoshoneycomb.slo.probes
Nameslo_has_enough_remaining_budget
Returnboolean

Usage

JSON

{
  "name": "slo-has-enough-remaining-budget",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaoshoneycomb.slo.probes",
    "func": "slo_has_enough_remaining_budget",
    "arguments": {
      "dataset_slug": "",
      "slo_id": ""
    }
  }
}

YAML

name: slo-has-enough-remaining-budget
provider:
  arguments:
    dataset_slug: ''
    slo_id: ''
  func: slo_has_enough_remaining_budget
  module: chaoshoneycomb.slo.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
dataset_slugstringYesDatasetDataset slug
slo_idstringYesSLO Identifier
min_budgetfloat1.0NoRemaining BudgetA number representing how much budget left should exist still

Signature

def slo_has_enough_remaining_budget(
        dataset_slug: str,
        slo_id: str,
        min_budget: float = 1.0,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass