Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PC-12940/PC-12941 Allow to configure budget drop condition type #423

Conversation

nobl9-adam-szymanski
Copy link
Contributor

@nobl9-adam-szymanski nobl9-adam-szymanski commented May 23, 2024

Motivation

Allow to configure new condition type based on budget drop.

Summary

  1. Extend set of alerting conditions with new measurement budgetDrop.
  2. Block possibility to set lastsFor for new condition type.
  3. Force to set alertingWindow for new condition type.
  4. Operator is GTE.

Testing

Run sloctl apply -f fast-budget.yaml:

apiVersion: n9/v1alpha
kind: AlertPolicy
metadata:
 name: fast-budget-drop
 displayName: Fast budget drop (5% over the last 1h)
spec:
 description: The error budget dropped by 5% of the error budget based on the 1h observation window
 severity: High
 coolDown: "5m"
 conditions:
   - measurement: budgetDrop
     value: 0.05
     alertingWindow: 1h
     op: gte

Release Notes

Add support for new alerting condition based on budget drop with new measurement budgetDrop.

Example:

apiVersion: n9/v1alpha
kind: AlertPolicy
metadata:
 name: fast-budget-drop
 displayName: Fast budget drop (5% over the last 15m)
spec:
 description: The error budget dropped by 5% of the error budget based on the 15m alerting window
 severity: High
 coolDown: "5m"
 conditions:
   - measurement: budgetDrop
     value: 0.05
     alertingWindow: 15m
     op: gte

Co-authored-by: Piotr Kwarciński <100768054+piotrkwarcinski@users.noreply.github.com>
@piotrkwarcinski piotrkwarcinski self-requested a review June 17, 2024 09:14
@nobl9-adam-szymanski nobl9-adam-szymanski enabled auto-merge (squash) June 25, 2024 10:16
@nobl9-adam-szymanski nobl9-adam-szymanski merged commit f250b20 into main Jun 25, 2024
5 checks passed
@nobl9-adam-szymanski nobl9-adam-szymanski deleted the PC-12940/PC-12941-allow-to-configure-budget-drop-condition-type branch June 25, 2024 10:19
@piotrkwarcinski piotrkwarcinski restored the PC-12940/PC-12941-allow-to-configure-budget-drop-condition-type branch June 25, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants