System usage data for `operations_dashboard` sends a nested JSON

https://gitlab.com/gitlab-org/gitlab-ee/blob/9abc46fd5a459e52030e42e018f9c5b514cf1494/ee/lib/ee/gitlab/usage_data.rb

System usage data for operations_dashboard sends a nested JSON rather than an integer value. Version.gitlab.com doesn't expect that shape, and several screens fails


operations_dashboard:
          {
            default_dashboard: 1,
            users_with_projects_added: 3
          }

This MR fixes the issue created for the version app the /metrics screen: https://gitlab.com/gitlab-org/version-gitlab-com/merge_requests/195

We need a whether we allow nested usage counts:

  1. If we have nested usage counts;
  • We need to parse, and transform the stats data in version.gitlab.com
  • We need to move Postgres to a higher version from 9.3 on version.gitlab.com as it has inadequate support for JSON
  1. We must also right some tests in EE and Version app, to handle the expected shapes for stats/counts data.

A suggested way is to keep a flat one-level JSON schema.


operations_dashboard_default_dashboard: 1,
operations_dashboard_dusers_with_projects_added: 3
Edited Sep 02, 2019 by Alper Akgun
Assignee Loading
Time tracking Loading