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

Bounded provider-owned slice description for Phase 5 generators.

> #### 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.

# `t`

```elixir
@type t() :: %Parapet.SLO.SliceSpec{
  alert_class: term(),
  bad_matchers: term(),
  bad_source_metric: term(),
  for: term(),
  good_matchers: term(),
  good_source_metric: term(),
  group_labels: term(),
  integration: term(),
  keep_firing_for: term(),
  kind: term(),
  labels: term(),
  min_total_rate: term(),
  name: term(),
  objective: term(),
  runbook: term(),
  summary: term(),
  threshold: term(),
  total_matchers: term(),
  total_source_metric: term()
}
```

# `default_for`
*since 1.0.0* 

Returns the default `for:` duration string for the Prometheus alert rule based on alert class.

# `default_keep_firing_for`
*since 1.0.0* 

Returns the default `keep_firing_for:` duration string for the Prometheus alert rule based
on alert class.

# `diagnostic?`
*since 1.0.0* 

Returns `true` if this slice is a `:diagnostic` kind slice, `false` otherwise.

# `new`
*since 1.0.0* 

Builds a validated `Parapet.SLO.SliceSpec` struct from a keyword list of options.
Raises `ArgumentError` if required fields are missing or invalid.

# `severity`
*since 1.0.0* 

Returns the Prometheus alerting severity label string for this slice's alert class.

# `threshold`
*since 1.0.0* 

Returns the error threshold for this slice as a fraction between 0 and 1.
If an explicit `:threshold` is set, it is returned directly. Otherwise it is derived
from `:objective` as `1 - objective / 100`.

# `value_matchers`
*since 1.0.0* 

Returns the primary label matchers for this slice. For diagnostic slices, returns the bad
matchers; for ratio slices, returns the good matchers.

# `value_metric`
*since 1.0.0* 

Returns the primary metric name for this slice. For diagnostic slices, returns the bad metric;
for ratio slices, returns the good metric.

---

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