# `Parapet.SLO.StarterPack.WebSaaS`
[🔗](https://github.com/szTheory/parapet/blob/v1.0.0/lib/parapet/slo/starter_pack/web_saas.ex#L1)

Opinionated first-SLO pack for Phoenix SaaS teams.

Register in one line:

    config :parapet, providers: [Parapet.SLO.StarterPack.WebSaaS]

Ships three slices with documented default objectives, each pinned to the real
Prometheus series this codebase emits. These are opinionated, inspectable, and
overridable defaults — not auto-generated targets.

## Slices

### HTTP Availability (`web_saas_http_availability`)

- **Metric:** `parapet_http_request_count` — the real HTTP counter emitted by Parapet's
  plug (`parapet.http.request.count` → Prometheus underscores).
- **Objective:** 99.5% — approximately 3.65 hours/month of non-2xx/3xx budget.
- **Alert class:** `:ticket` — aggregate HTTP errors are noisy on first adoption;
  ticket-level keeps alert fatigue low. Upgrade to `:page` once you understand your
  actual traffic patterns.
- **Matches:** `status_class` label (values `"2xx"`, `"3xx"`, `"4xx"`, `"5xx"`).
  The plug emits `status_class` as a low-cardinality tag; use it for label selectors.

### Login Journey (`web_saas_login_journey`)

- **Metric:** `parapet_journey_login_count` — the Sigra integration counter
  (`parapet.journey.login.count` → Prometheus underscores).
- **Objective:** 99.9% — approximately 43 minutes/month of user-impacting auth failures.
- **Alert class:** `:page` — auth failures are silent revenue loss; worth paging.
  Login failures are low-volume and directly user-impacting.
- **Matches:** `outcome` label (`:success` / `:failure`).

### Oban Job Success (`web_saas_oban_job_success`)

- **Metric:** `parapet_oban_jobs_total` — the Oban integration counter
  (`parapet.oban.jobs.total` → Prometheus underscores).
- **Objective:** 99.0% — approximately 7.3 hours/month of job-level failures.
- **Alert class:** `:ticket` — jobs include retries, so transient failures are expected;
  99.0% accommodates retry-normal patterns. Adopters with critical-path jobs (e.g.
  payment processing) should override to 99.9% + `:page`.
- **Matches:** `state` label (values `"success"`, `"failure"`, `"cancelled"`, `"discarded"`).

## Low-Traffic Safety

All slices use the default `min_total_rate: 0.01` (~0.6 requests/minute over a 1-hour
window), which the Generator renders as `... and <total_rate_record> > 0.01` in every
alert expression. This prevents alert flapping on low-traffic services. Zero Generator
changes are required.

> #### Stable {: .info}
>
> This module is **stable** as of v1.0.0. Its public API will not change without a
> major-version bump and a full deprecation cycle. See
> [Stability & Deprecation Policy](stability.html) for details.

# `slos`
*since 1.0.0* 

Returns the three WebSaaS SLO slices: HTTP availability, login journey, and Oban job success.

Each slice is pinned to the real Prometheus series emitted by this codebase, with an
opinionated default objective and low-cardinality label matchers. Register this provider
via `config :parapet, providers: [Parapet.SLO.StarterPack.WebSaaS]`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
