Skip to content

feat: Add a plugin that records Sli total amount rules#773

Open
mimitantono wants to merge 2 commits intoslok:mainfrom
mimitantono:sli-total-amount-rules
Open

feat: Add a plugin that records Sli total amount rules#773
mimitantono wants to merge 2 commits intoslok:mainfrom
mimitantono:sli-total-amount-rules

Conversation

@mimitantono
Copy link
Copy Markdown

Summary

This merge request adds a new Sloth SLO plugin that generates Prometheus recording rules for the total SLI amount, preserving the TotalQuery defined in the SLO spec.

The plugin emits the metric slo:sli_total:amount and is designed to be used as part of Sloth’s existing plugin chain.

Motivation

Sloth currently derives ratios and burn rates but does not expose the raw total SLI amount. Recording this value explicitly improves debuggability, traffic correlation, and reuse of the original TotalQuery without duplication or drift.

Behavior

  • Generates one recording rule group per SLO
  • Preserves the original TotalQuery
  • Uses unique rule group names to avoid conflicts
  • Fully opt-in; no impact on existing Sloth behavior

@mimitantono mimitantono requested a review from slok as a code owner December 25, 2025 17:19
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant