Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
4fa71584
Commit
4fa71584
authored
Jun 07, 2017
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add prometheus metrics on pipeline creation
parent
6ee216c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
app/services/ci/create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+6
-0
changelogs/unreleased/zj-prom-pipeline-count.yml
changelogs/unreleased/zj-prom-pipeline-count.yml
+4
-0
No files found.
app/services/ci/create_pipeline_service.rb
View file @
4fa71584
...
...
@@ -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
changelogs/unreleased/zj-prom-pipeline-count.yml
0 → 100644
View file @
4fa71584
---
title
:
Add prometheus metrics on pipeline creation
merge_request
:
author
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment