diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-10-01 14:15:31 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-10-01 18:11:09 +0300 |
commit | 9b2e17ac71ee446da0f34dada41401803af816c7 (patch) | |
tree | a352314d1cd94dcfd43566997f119d6bdc8730ce /lib/gitlab/usage_data.rb | |
parent | d924176117f3cc73f539ed90b47e1912a3478cf0 (diff) |
Adds WebIDE commits to UsagePing
Implements UsageCounters model to track feature usage counters
and makes easy to extend for future counters
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r-- | lib/gitlab/usage_data.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index f7d8ee571cd..afab36e89dd 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -10,6 +10,7 @@ module Gitlab .merge(features_usage_data) .merge(components_usage_data) .merge(cycle_analytics_usage_data) + .merge(usage_counters) end def to_json(force_refresh: false) @@ -106,6 +107,10 @@ module Gitlab } end + def usage_counters + UsageCounters.first_or_create.totals + end + def components_usage_data { gitlab_pages: { enabled: Gitlab.config.pages.enabled, version: Gitlab::Pages::VERSION }, |