Add prometheus metrics on pipeline creation

This commit is contained in:
Z.J. van de Weg 2017-06-07 17:12:23 +02:00
parent 6ee216c4d9
commit 4fa71584a3
2 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,4 @@
---
title: Add prometheus metrics on pipeline creation
merge_request:
author: