switch liquid designate to use prometheus queries for usage#848
Merged
switch liquid designate to use prometheus queries for usage#848
Conversation
15be92c to
78f458e
Compare
majewsky
requested changes
Mar 12, 2026
78f458e to
e3ecefc
Compare
Merging this branch will not change overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
majewsky
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please don't forget to merge the respective configuration change PR: sapcc/helm-charts#10970
This PR switches the 2 metrics which we derive for designate usage from the http API to Prometheus data, which is exported directly from the designate DB. This is to improve performance. In qa-de-1, on a random small project, we get a runtime of below 1s from Prometheus, while using the API results in 5s of runtime or more.
Opening this PR as draft for now, because the values of thezonesmetric between the old data and new data don't match when testing in qa-de-1. Here are the projects with their deviations that I just derived:project_idPrometheusHTTP API631a3518e93d436fbdf57525babe860624c7201c32f08a4149ac6eb4ea4db4870d4416e9141fb24eee4b3e9f25ae69cda3113220194caeee5bd86745f18233c07f51e7bd4323486ece4535a44096be6ae216139249f254fdcf78492695421ab9767832a75d568a853ea858d5d9374fbe820be72baf908da3783296f272e220c75f4796b5bb6542649350fd24151b939a96561c49aca6b1002ec209df8b13d940aae3f8084f15a9b67de5b3b397201497ac694b5dd3bb4eb38e4e68bf0df73597762735826666cc4a1789d267edce486de4123af1c3304e3c494aa798767243b9e43453dff2385e8ad54617a240540693450bfe(not present)2f0fb668325f746828d160f2ac3977275(not present)1The small deviations in the magnitude of 1 or 2 are from scraping delays, I won't worry about it. But I cannot grasp the deviations on the other projects, as the values are mostly flat in Prometheus.I found the deviations: The API seemingly filters out soft-deleted zones, which are naturally included in the database exports to Prometheus. When using the prometheus query with
status!="DELETED"(see referenced PR!), we get to the following deviations:1b939a96561c49aca6b1002ec209df8b2735826666cc4a1789d267edce486de43ea858d5d9374fbe820be72baf908da34caeee5bd86745f18233c07f51e7bd43631a3518e93d436fbdf57525babe8606d940aae3f8084f15a9b67de5b3b39720e9141fb24eee4b3e9f25ae69cda31132They are reasonably small so that I would assume they come from Limes scraping delays.
Checklist: