Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/usage_data_counters.rb')
-rw-r--r--lib/gitlab/usage_data_counters.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/gitlab/usage_data_counters.rb b/lib/gitlab/usage_data_counters.rb
index 224897ed758..eae1c593a8f 100644
--- a/lib/gitlab/usage_data_counters.rb
+++ b/lib/gitlab/usage_data_counters.rb
@@ -3,29 +3,38 @@
module Gitlab
module UsageDataCounters
COUNTERS = [
- PackageEventCounter,
WikiPageCounter,
- WebIdeCounter,
NoteCounter,
SnippetCounter,
SearchCounter,
CycleAnalyticsCounter,
ProductivityAnalyticsCounter,
SourceCodeCounter,
+ KubernetesAgentCounter,
+ MergeRequestWidgetExtensionCounter
+ ].freeze
+
+ COUNTERS_MIGRATED_TO_INSTRUMENTATION_CLASSES = [
+ PackageEventCounter,
MergeRequestCounter,
DesignsCounter,
- KubernetesAgentCounter,
DiffsCounter,
ServiceUsageDataCounter,
- MergeRequestWidgetExtensionCounter
+ WebIdeCounter
].freeze
UsageDataCounterError = Class.new(StandardError)
UnknownEvent = Class.new(UsageDataCounterError)
class << self
+ def unmigrated_counters
+ # we are using the #counters method instead of the COUNTERS const
+ # to make sure it's working correctly for `ee` version of UsageDataCounters
+ counters - self::COUNTERS_MIGRATED_TO_INSTRUMENTATION_CLASSES
+ end
+
def counters
- self::COUNTERS
+ self::COUNTERS + self::COUNTERS_MIGRATED_TO_INSTRUMENTATION_CLASSES
end
def count(event_name)