diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-03-22 00:41:18 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-03-22 00:44:06 +0100 |
commit | 0bf79bf12eb9407b094dbc1acbd777c7049c33ea (patch) | |
tree | c78e1d440b08004acab9ce9dd41968e9ba6015e6 | |
parent | 03bbd847deb16330d0e35ce662c282b539eef9eb (diff) | |
download | gitlab-ce-0bf79bf12eb9407b094dbc1acbd777c7049c33ea.tar.gz |
Add additional cluster usage metrics
-rw-r--r-- | lib/gitlab/usage_data.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 37d3512990e..8a6f08ddccd 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -50,6 +50,12 @@ module Gitlab clusters: ::Clusters::Cluster.count, clusters_enabled: ::Clusters::Cluster.enabled.count, clusters_disabled: ::Clusters::Cluster.disabled.count, + clusters_gke: ::Clusters::Cluster.where(provider_type: ::Clusters::Cluster.provider_types[:gcp]).count, + clusters_user: ::Clusters::Cluster.where(provider_type: ::Clusters::Cluster.provider_types[:user]).count, + clusters_helm: ::Clusters::Applications::Helm.count, + clusters_ingress: ::Clusters::Applications::Ingress.count, + clusters_prometheus: ::Clusters::Applications::Prometheus.count, + clusters_runner: ::Clusters::Applications::Runner.count, in_review_folder: ::Environment.in_review_folder.count, groups: Group.count, issues: Issue.count, diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 138d21ede97..e50ac72d042 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -64,6 +64,12 @@ describe Gitlab::UsageData do clusters clusters_enabled clusters_disabled + clusters_gke + clusters_user + clusters_helm + clusters_ingress + clusters_prometheus + clusters_runner in_review_folder groups issues |