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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /lib/gitlab/usage_data_counters
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'lib/gitlab/usage_data_counters')
-rw-r--r--lib/gitlab/usage_data_counters/hll_redis_counter.rb1
-rw-r--r--lib/gitlab/usage_data_counters/known_events/ci_users.yml5
-rw-r--r--lib/gitlab/usage_data_counters/known_events/common.yml1
-rw-r--r--lib/gitlab/usage_data_counters/known_events/error_tracking.yml11
-rw-r--r--lib/gitlab/usage_data_counters/known_events/quickactions.yml4
-rw-r--r--lib/gitlab/usage_data_counters/known_events/work_items.yml11
-rw-r--r--lib/gitlab/usage_data_counters/service_usage_data_counter.rb8
-rw-r--r--lib/gitlab/usage_data_counters/work_item_activity_unique_counter.rb28
8 files changed, 68 insertions, 1 deletions
diff --git a/lib/gitlab/usage_data_counters/hll_redis_counter.rb b/lib/gitlab/usage_data_counters/hll_redis_counter.rb
index c6e9db6a314..474ab9a4dd9 100644
--- a/lib/gitlab/usage_data_counters/hll_redis_counter.rb
+++ b/lib/gitlab/usage_data_counters/hll_redis_counter.rb
@@ -26,6 +26,7 @@ module Gitlab
ecosystem
epic_boards_usage
epics_usage
+ error_tracking
ide_edit
incident_management
issues_edit
diff --git a/lib/gitlab/usage_data_counters/known_events/ci_users.yml b/lib/gitlab/usage_data_counters/known_events/ci_users.yml
new file mode 100644
index 00000000000..63498a35858
--- /dev/null
+++ b/lib/gitlab/usage_data_counters/known_events/ci_users.yml
@@ -0,0 +1,5 @@
+- name: ci_users_executing_deployment_job
+ category: ci_users
+ redis_slot: ci_users
+ aggregation: weekly
+ feature_flag: job_deployment_count
diff --git a/lib/gitlab/usage_data_counters/known_events/common.yml b/lib/gitlab/usage_data_counters/known_events/common.yml
index 96755db8439..fdf4bc58525 100644
--- a/lib/gitlab/usage_data_counters/known_events/common.yml
+++ b/lib/gitlab/usage_data_counters/known_events/common.yml
@@ -324,7 +324,6 @@
category: snippets
redis_slot: snippets
aggregation: weekly
- feature_flag: usage_data_i_snippets_show
# Terraform
- name: p_terraform_state_api_unique_users
category: terraform
diff --git a/lib/gitlab/usage_data_counters/known_events/error_tracking.yml b/lib/gitlab/usage_data_counters/known_events/error_tracking.yml
new file mode 100644
index 00000000000..a56e0a6d370
--- /dev/null
+++ b/lib/gitlab/usage_data_counters/known_events/error_tracking.yml
@@ -0,0 +1,11 @@
+---
+- name: error_tracking_view_details
+ category: error_tracking
+ redis_slot: error_tracking
+ aggregation: weekly
+ feature_flag: track_error_tracking_activity
+- name: error_tracking_view_list
+ category: error_tracking
+ redis_slot: error_tracking
+ aggregation: weekly
+ feature_flag: track_error_tracking_activity
diff --git a/lib/gitlab/usage_data_counters/known_events/quickactions.yml b/lib/gitlab/usage_data_counters/known_events/quickactions.yml
index 49891080b03..4ba7ea2d407 100644
--- a/lib/gitlab/usage_data_counters/known_events/quickactions.yml
+++ b/lib/gitlab/usage_data_counters/known_events/quickactions.yml
@@ -127,6 +127,10 @@
category: quickactions
redis_slot: quickactions
aggregation: weekly
+- name: i_quickactions_page
+ category: quickactions
+ redis_slot: quickactions
+ aggregation: weekly
- name: i_quickactions_publish
category: quickactions
redis_slot: quickactions
diff --git a/lib/gitlab/usage_data_counters/known_events/work_items.yml b/lib/gitlab/usage_data_counters/known_events/work_items.yml
new file mode 100644
index 00000000000..0c9c6026c46
--- /dev/null
+++ b/lib/gitlab/usage_data_counters/known_events/work_items.yml
@@ -0,0 +1,11 @@
+---
+- name: users_updating_work_item_title
+ category: work_items
+ redis_slot: users
+ aggregation: weekly
+ feature_flag: track_work_items_activity
+- name: users_creating_work_items
+ category: work_items
+ redis_slot: users
+ aggregation: weekly
+ feature_flag: track_work_items_activity
diff --git a/lib/gitlab/usage_data_counters/service_usage_data_counter.rb b/lib/gitlab/usage_data_counters/service_usage_data_counter.rb
new file mode 100644
index 00000000000..aa1d9583ea5
--- /dev/null
+++ b/lib/gitlab/usage_data_counters/service_usage_data_counter.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Gitlab::UsageDataCounters
+ class ServiceUsageDataCounter < BaseCounter
+ KNOWN_EVENTS = %w[download_payload_click].freeze
+ PREFIX = 'service_usage_data'
+ end
+end
diff --git a/lib/gitlab/usage_data_counters/work_item_activity_unique_counter.rb b/lib/gitlab/usage_data_counters/work_item_activity_unique_counter.rb
new file mode 100644
index 00000000000..6f5300405c7
--- /dev/null
+++ b/lib/gitlab/usage_data_counters/work_item_activity_unique_counter.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module UsageDataCounters
+ module WorkItemActivityUniqueCounter
+ WORK_ITEM_CREATED = 'users_creating_work_items'
+ WORK_ITEM_TITLE_CHANGED = 'users_updating_work_item_title'
+
+ class << self
+ def track_work_item_created_action(author:)
+ track_unique_action(WORK_ITEM_CREATED, author)
+ end
+
+ def track_work_item_title_changed_action(author:)
+ track_unique_action(WORK_ITEM_TITLE_CHANGED, author)
+ end
+
+ private
+
+ def track_unique_action(action, author)
+ return unless author
+
+ Gitlab::UsageDataCounters::HLLRedisCounter.track_event(action, values: author.id)
+ end
+ end
+ end
+ end
+end