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>2023-03-28 21:15:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-28 21:15:00 +0300
commit14059114eb35b29cf83aa1b715158c96c55ab388 (patch)
treeb9b96e6bb66e3b1caf900bdce664a234087a4848 /lib/gitlab/import
parentee7db70e1185876e97eca97ce8efabfc64c360b9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/import')
-rw-r--r--lib/gitlab/import/metrics.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/gitlab/import/metrics.rb b/lib/gitlab/import/metrics.rb
index e457d9ec57c..8263df3dc37 100644
--- a/lib/gitlab/import/metrics.rb
+++ b/lib/gitlab/import/metrics.rb
@@ -32,14 +32,14 @@ module Gitlab
return unless project.github_import?
track_usage_event(:github_import_project_failure, project.id)
- track_import_state('github')
+ track_import_state('github', 'Import::GithubService')
end
def track_canceled_import
return unless project.github_import?
track_usage_event(:github_import_project_cancelled, project.id)
- track_import_state('github')
+ track_import_state('github', 'Import::GithubService')
end
def issues_counter
@@ -83,7 +83,7 @@ module Gitlab
def track_finish_metric
return unless project.github_import?
- track_import_state('github')
+ track_import_state('github', 'Import::GithubService')
case project.beautified_import_status_name
when 'partially completed'
@@ -93,13 +93,14 @@ module Gitlab
end
end
- def track_import_state(type)
+ def track_import_state(type, category)
Gitlab::Tracking.event(
- importer,
+ category,
'create',
label: "#{type}_import_project_state",
project: project,
- extra: { import_type: type, state: project.beautified_import_status_name }
+ import_type: type,
+ state: project.beautified_import_status_name
)
end
end