Add Usage Data internal API endpoint to generate usage ping without SQL based metrics
In order to have the SQL metrics to be able to run the same SQL queries in the data warehouse, and also have the data which is stored in Redis, Prometheus, or system data we collect, we want to implement an internal API that returns the raw SQL queries and Non SQL metrics data.
Internal API for raw SQL queries is being worked upon as part of #297380 (closed)
This issue, talks about adding an internal API for Non SQL metrics.
As part of the API we implement the following:
-
Usage Ping class overriding some SQL metric methods from
usage_data.rb
utils -
Internal API using this class to calculate the metrics and return JSON for the response.
This API would be called from a pipeline #292940 (closed) or https://gitlab.com/gitlab-data/analytics/-/issues/7899