Bounded provider-owned slice description for Phase 5 generators.
Stable
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 for details.
Summary
Functions
Returns the default for: duration string for the Prometheus alert rule based on alert class.
Returns the default keep_firing_for: duration string for the Prometheus alert rule based
on alert class.
Returns true if this slice is a :diagnostic kind slice, false otherwise.
Builds a validated Parapet.SLO.SliceSpec struct from a keyword list of options.
Raises ArgumentError if required fields are missing or invalid.
Returns the Prometheus alerting severity label string for this slice's alert class.
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.
Returns the primary label matchers for this slice. For diagnostic slices, returns the bad matchers; for ratio slices, returns the good matchers.
Returns the primary metric name for this slice. For diagnostic slices, returns the bad metric; for ratio slices, returns the good metric.
Types
@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() }
Functions
Returns the default for: duration string for the Prometheus alert rule based on alert class.
Returns the default keep_firing_for: duration string for the Prometheus alert rule based
on alert class.
Returns true if this slice is a :diagnostic kind slice, false otherwise.
Builds a validated Parapet.SLO.SliceSpec struct from a keyword list of options.
Raises ArgumentError if required fields are missing or invalid.
Returns the Prometheus alerting severity label string for this slice's alert class.
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.
Returns the primary label matchers for this slice. For diagnostic slices, returns the bad matchers; for ratio slices, returns the good matchers.
Returns the primary metric name for this slice. For diagnostic slices, returns the bad metric; for ratio slices, returns the good metric.