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:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-06-07 18:12:23 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-06-07 18:29:13 +0300
commit4fa71584a325965327a312682530b246d78fec13 (patch)
tree03284a96510a2ee84ed7c6dd2e7e4fb6bfd85b05 /app/services
parent6ee216c4d96f0e5c9b2f4bfe21fa808b476f8365 (diff)
Add prometheus metrics on pipeline creation
Diffstat (limited to 'app/services')
-rw-r--r--app/services/ci/create_pipeline_service.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb
index bffec216819..769749c9925 100644
--- a/app/services/ci/create_pipeline_service.rb
+++ b/app/services/ci/create_pipeline_service.rb
@@ -57,6 +57,8 @@ module Ci
cancel_pending_pipelines if project.auto_cancel_pending_pipelines?
+ pipeline_created_counter.increment(source: source)
+
pipeline.tap(&:process!)
end
@@ -131,5 +133,9 @@ module Ci
pipeline.drop if save
pipeline
end
+
+ def pipeline_created_counter
+ @pipeline_created_counter ||= Gitlab::Metrics.counter(:pipelines_created_count, "Pipelines created count")
+ end
end
end