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

fix(rules): handle apiserver normalized buckets #1008

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

skl
Copy link
Collaborator

@skl skl commented Dec 30, 2024

This PR takes the work and feedback from #965 and #1006 and brings it into a single PR which:

  • Updates the API Server availability and burn-rate recording rules to support both Prometheus v2 {le="1"} and v3 {le="1.0"} histogram bucket formats. This is achieved through the use of regex matchers to make the decimal part optional.
  • Also updates some matchers which were missed in Fix: Handle float apiserver buckets #965
  • N.B. double-double-escaped regex required (once for jsonnent and once for Prometheus).

I did an ad-hoc benchmark of query latency difference for the apiserver_request:availability30d recording rule on a fleet of clusters and saw no significant differences when using the regex matchers in this PR.

Supersedes #965 #1006
Fixes #1005

@skl skl added the bug Something isn't working label Dec 30, 2024
@skl skl self-assigned this Dec 30, 2024
@skl skl requested a review from povilasv as a code owner December 30, 2024 12:48
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@skl skl merged commit 03c13f9 into master Dec 30, 2024
18 checks passed
@skl skl deleted the skl/apiserver-rules-le-regex branch December 30, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: broken recording rules with Prometheus v3
3 participants