Usage Ping: Query recorded Prometheus metrics
What does this MR do?
Depends on: omnibus-gitlab!4343 (merged) Replaces: !34936 (closed)
We recently introduced Usage Ping functionality that pulls data from the bundled Omnibus Prometheus (assuming it is running.) This is now documented here: https://docs.gitlab.com/ee/development/telemetry/usage_ping.html#prometheus-queries
In the initial iteration that shipped with 13.1, these queries were sent to Prometheus ad-hoc, i.e. queries that contained potentially long-term aggregations were evaluated at query time. They were also fairly complex at times.
In this MR we implement the client-side counterpart for omnibus-gitlab!4343 (merged), i.e. we are now sending much simpler PromQL queries that will fetch weekly averages of the recorded metrics. This makes for a faster and more stable contract between client and server.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
-
Tested manually in GCK container -
Tested in Omnibus container
References
- Epic: &3209
- Use recording rules: #218548 (closed)