Commit 4fa71584 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Add prometheus metrics on pipeline creation

parent 6ee216c4
...@@ -57,6 +57,8 @@ module Ci ...@@ -57,6 +57,8 @@ module Ci
cancel_pending_pipelines if project.auto_cancel_pending_pipelines? cancel_pending_pipelines if project.auto_cancel_pending_pipelines?
pipeline_created_counter.increment(source: source)
pipeline.tap(&:process!) pipeline.tap(&:process!)
end end
...@@ -131,5 +133,9 @@ module Ci ...@@ -131,5 +133,9 @@ module Ci
pipeline.drop if save pipeline.drop if save
pipeline pipeline
end end
def pipeline_created_counter
@pipeline_created_counter ||= Gitlab::Metrics.counter(:pipelines_created_count, "Pipelines created count")
end
end end
end end
---
title: Add prometheus metrics on pipeline creation
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment