# SLOs

Service level objectives in Maple: availability and latency objectives on a service's requests, how the error budget is computed, the multiwindow burn-rate alerts that page, where SLO status shows, and SLOs from the API and MCP.

A **service level objective** (SLO) sets the share of a service's requests that must be good over a rolling window, such as 99.9% over 30 days. The share left over is the **error budget**. Maple tracks how much of the budget is left and opens an [incident](/docs/alerting/incidents) when the budget burns too fast, instead of on every short spike.

SLOs live under **Alerts → SLOs**. Org admins and engineers can create, change and delete them (the **Manage SLOs and budgets** permission). Anyone who can read telemetry can view them.

## What an SLO counts

An SLO reads one service's **entry-point spans**: its server, consumer and root spans, the same requests the service overview counts. Each span is a good or a bad event:

| Indicator    | A good event is                                                 |
| ------------ | --------------------------------------------------------------- |
| Availability | An entry-point span whose status is not `Error`                 |
| Latency      | An entry-point span faster than a threshold you pick, 50 ms to 10 s |

The latency thresholds are fixed steps: 50 ms, 100 ms, 250 ms, 500 ms, 1 s, 2.5 s, 5 s and 10 s.

Counts are weighted by sampling rate, like the service overview's estimates. An SLO can be limited to some deployment environments; with none listed it counts every environment.

## Create an SLO

1. Open **Alerts → SLOs** and click **New SLO**. **New rule** on the Alerts page also offers **SLO** under its arrow.
2. **Name**: a name unique among your organization's SLOs, such as `Checkout API`. It titles the SLO's incidents and notifications. **Description (optional)** says what the objective promises.
3. **Service**: pick the service from the ones traced in the last day. Under it, **Environments** takes a comma-separated list, such as `production, staging`. Leave it empty to count every environment.
4. **Indicator**: pick **Availability** or **Latency**. For latency, pick the threshold.
5. **Target**: pick 99%, 99.5%, 99.9%, 99.95% or 99.99%, or **Custom** for any value from 50% to 99.999%. The hint under it shows the error budget and how much full outage it allows over the window.
6. **Window**: the rolling window the budget is measured over, 7, 28 or 30 days. The default is 30 days.
7. **Alerting**: leave **Open incidents when the error budget burns too fast** on, and pick who each severity notifies. **Critical** pages; **Warning** opens a ticket. With nobody picked, the incident still opens in the inbox.
8. Click **Create SLO**.

A new SLO defaults to availability, a 99.9% target, a 30-day window and alerting on.

## The error budget

The error budget is the share of events the target allows to be bad: `100% - target`. A 99.9% target leaves 0.1% of events, which over 30 days is about 43 minutes of full outage if traffic is steady. The budget counts events, not time: requests that never reach your service during an outage send no spans and use none of it.

**Error budget left** compares the bad events in the window with that allowance:

```
budget used = (bad events / total events) / (1 - target)
budget left = 1 - budget used
```

At 99.9%, a window where 0.05% of requests failed has used half its budget. Budget left goes below zero when the window has more bad events than the target allows.

With too few events, the budget gets no verdict: one failed request in a handful overspends any target. A spent budget needs at least 10 recorded events and 2 bad ones.

When the budget is spent, the SLO opens a **warning** incident of its own, separate from the burn-rate alerts. It stays open until 2% of the budget is back, and reminds its destinations once a day. The budget is read every few minutes.

## Burn-rate alerts

The **burn rate** is how fast a window spends the budget. A burn rate of 1 spends exactly the whole budget over the SLO window. A burn rate of 14.4 spends 2% of a 30-day budget in one hour.

Each tier below fires when both its long and its short window burn at least its factor. The long window shows the burn is real; the short window makes the alert resolve soon after the burn stops.

| Severity | Burn rate | Long window | Short window |
| -------- | --------- | ----------- | ------------ |
| Critical | 14.4x     | 1 hour      | 5 minutes    |
| Warning  | 6x        | 6 hours     | 30 minutes   |
| Warning  | 3x        | 24 hours    | 2 hours      |

- **Critical** notifies the critical destinations. **Warning** notifies the warning destinations, and a critical incident notifies them too.
- The rule is checked every minute. One breached check opens the incident and one healthy check resolves it. An open burn incident reminds its destinations every hour.
- A tier fires only when its long window holds at least 10 recorded events and 2 bad ones, so one failed request on a quiet service does not page.
- When a tier's short window has no events at all, the alert holds its state: a gap in data neither opens nor resolves it.
- A low target cannot reach the high factors: a total outage at 90% burns at most 10x. For such targets the factor is capped at 80% of the highest burn the target can reach, and the form says so under the alerting pickers.

The notification names which windows are burning and how fast. Turn alerting off to keep the SLO's status without incidents.

Each SLO manages a hidden alert rule named `SLO burn: <name>`. Edit the SLO, not the rule. SLO rules do not count toward the [enabled rule limit](/docs/reference/limits).

## Where SLO status shows

**Alerts → SLOs** lists every SLO with its **Indicator**, **Current SLI**, **Budget left**, **Fastest burn** and whether **Alerting** is on.

Open an SLO to see:

- **Current SLI** against the target, **Error budget left**, and **Events counted** split into good and bad.
- **Error budget**: the budget left over the window, one point per hour.
- **SLI**: the share of good events over time against the target.
- **Burn rate**: each window's current burn and whether its tier would fire, is holding, or is quiet.
- **Alerting**: who each severity notifies.
- **Incidents**: the SLO's burn incidents, and the **Budget spent** incidents.

**Edit** and **Delete** sit in the page header. Deleting an SLO also deletes its alert rule.

## SLOs from the API or an AI assistant

The [API](/docs/reference/api) serves SLOs under `/v2/slos`:

| Endpoint                    | What it does                                               |
| --------------------------- | ---------------------------------------------------------- |
| `GET /v2/slos`              | Lists SLOs, most recently created first                    |
| `POST /v2/slos`             | Creates an SLO                                             |
| `GET /v2/slos/{id}`         | Returns one SLO by its `slo_…` id                          |
| `PATCH /v2/slos/{id}`       | Changes an SLO; omitted fields keep their value            |
| `DELETE /v2/slos/{id}`      | Deletes an SLO and its burn-rate alert rule                |
| `GET /v2/slos/statuses`     | The SLI, budget left and burn windows of every SLO at once |
| `GET /v2/slos/{id}/status`  | One SLO's SLI, budget and current burn rates               |
| `GET /v2/slos/{id}/history` | The error budget over the SLO window, one point per hour   |

Creating, changing and deleting need the **Manage SLOs and budgets** permission; reads need telemetry read access.

```bash
curl https://api.maple.dev/v2/slos \
  -H "Authorization: Bearer maple_ak_…" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Checkout API",
    "service_name": "checkout",
    "environments": ["production"],
    "sli": { "type": "latency", "threshold_ms": 500 },
    "target_percent": 99.9,
    "window_days": 30,
    "alerting": {
      "enabled": true,
      "critical_destination_ids": ["dest_…"]
    }
  }'
```

`sli` is `{ "type": "availability" }` or `{ "type": "latency", "threshold_ms": … }`. `window_days` defaults to 30. A new SLO alerts with no destinations until you add some.

On the [MCP server](/docs/reference/mcp), `list_slos` lists every SLO with its current SLI, budget left and worst burn rate, breaching ones first. `inspect_slo` shows one in full. `manage_slo` creates, changes or deletes one (`action=create`, `update` or `delete`); deleting needs `confirm=true`.

## Limits

- **50 SLOs per organization.**
- **One service per SLO**, counting its entry-point spans only. To watch a dependency or a single route, use an [alert rule](/docs/alerting/alert-rules).
- **Fixed burn-rate tiers.** The factors and windows above are the same for every SLO; only a low target caps them.
- **Fixed latency thresholds**: 50 ms to 10 s, in the steps listed above.
- **Rolling windows only**: 7, 28 or 30 days.
- **No Terraform, Pulumi or Alchemy resource.** Manage SLOs in the app, the API or MCP.

## Next steps

- [Alert rules](/docs/alerting/alert-rules): thresholds on any signal.
- [Incidents](/docs/alerting/incidents): what happens after an SLO fires.
- [Escalation chains](/docs/alerting/escalation-chains): page people step by step.
- [Apdex alerts](/docs/alerting/apdex-alerts): alert on how satisfied users are with response times.
