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

💡 [REQUEST] - Prometheus SLO Recording Rule examples #395

Open
1 task done
skinlayers opened this issue Nov 29, 2023 · 1 comment
Open
1 task done

💡 [REQUEST] - Prometheus SLO Recording Rule examples #395

skinlayers opened this issue Nov 29, 2023 · 1 comment
Assignees
Labels
backend p/prometheus Prometheus provider issue question Further information is requested

Comments

@skinlayers
Copy link

Summary

Please provide examples of prometheus recording rules that could be used with the sample prometheus SLOs.

Basic Example

A Prometheus (Mimir) latency SLO is taking several minutes to return all data points when calculating the 28d window in one of our production environment. We'd like to leverage prometheus recording rules to reduce the load the SLO causes. However, SLO Generator's [window] placeholder isn't compatible with recording rules that already include a time range e.g. prometheus_http_request_duration_seconds_count{}[5m].

So far, the only potential workarounds I can think of are using a recording rule without a time range to just reduce cardinality, or to create a separate error_budget_policies in config.yaml with subqueries for the window values, instead of the number of seconds.

Screenshots

No response

Drawbacks

I don't see any drawbacks.

Unresolved questions

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@skinlayers skinlayers added the question Further information is requested label Nov 29, 2023
@lvaylet
Copy link
Collaborator

lvaylet commented Nov 29, 2023

Hi @skinlayers, thanks for reporting this behavior.

I am not a Prometheus expert so I will probably need to do a bit of research.

Could you provide more context regarding this statement?

SLO Generator's [window] placeholder isn't compatible with recording rules that already include a time range e.g. prometheus_http_request_duration_seconds_count{}[5m].

If this (lack of) compatibility is the issue here, and you already know how to write recording rules that pre-compute and cache the 28d SLOs, another workaround may be to work on the queries directly.

@lvaylet lvaylet self-assigned this Nov 29, 2023
@lvaylet lvaylet added p/prometheus Prometheus provider issue backend labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend p/prometheus Prometheus provider issue question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants