Fix UsageDataQueries API not returning a query
The usage_data API didn't return queries for `approval_project_rules_*` metrics but the value instead because it called `.size` and not creating another query with a nested `SELECT COUNT(*) FROM(...)`. This MR fixes it by moving it to an instrumentation class and overriding the `value` and `to_sql` method to produce the correct output. Changelog: fixed MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/81823 EE: true
Showing
Please register or sign in to comment