Skip to content

Usage Ping: Use Prometheus recording rules

Matthias Käppler requested to merge 217698-usage-ping-request-volume into master

What does this MR do?

Depends on: omnibus-gitlab!4343 (merged)

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. for every single data point we wanted to track we had to send one query. This creates complexity in the client and is questionable from a performance perspective (see omnibus-gitlab!4343 (merged) for more details.)

In this MR we implented the client-side counterpart for omnibus-gitlab!4343 (merged), i.e. we are now sending a single PromQL query that pulls all gitlab_usage_ping:... metrics in one fell swoop, then maps it to usage ping JSON in the client.

There is one additional change, which is that we now also map out the application_requests_per_hour, which didn't exist before. Outside of that there shouldn't be changes in semantics, it's mostly a structural change.

Apologies for the noisy MR, but most of the diffs should actually be removing code and adding more complete file based Promtheus fixtures, the actual client code is much smaller now.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

References

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading