-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add pint check to disallow topk
or bottomk
in recording rules
#820
Comments
cc: @prymitive let me know what you think. happy to contribute this |
This adds a new check to warn against the use of `topk` or `bottomk` in recording rules. This is an anti-pattern as these operators lead to high churn as the time series the recording rule generates will change frequently as the conditions for topk/bottomk adjust. It is enabled by default with a warning severity. It will only fire for recording rules, not alerting rules. Resolves cloudflare#820
As mentioned in #985 (comment) I don't believe that just throwing warnings every time someone uses
then it is likely to cause flapping alerts, since |
I need a function that gives me the source of labels in a query and this check is a good use case for testing it - so expect it to be added in the next release. |
I believe a new check to warn users about the use of
topk
orbottomk
in recording rules would be useful, as those rules will typically churn quite often and create many new time series.This is fairly opinionated and could vary a lot of on the nature of the metric being aggregated so interested in discussion and definitely think it fits as a non-default rule
The text was updated successfully, but these errors were encountered: