diff options
author | Ben Kochie <bjk@gitlab.com> | 2017-07-19 09:43:57 +0200 |
---|---|---|
committer | Ben Kochie <bjk@gitlab.com> | 2017-07-19 09:43:57 +0200 |
commit | afba21f6a0a07a59bbe2aed2b25d6a50f8dc7e2e (patch) | |
tree | 75b1fcc9ae5e01869d2a2b3984dd1fa5739078f1 | |
parent | 3453bc328465156bf1fdb4c700c7c3b20d0c1967 (diff) | |
download | gitlab-ce-bjk/pipelines_created_total.tar.gz |
Update piplines created metric namebjk/pipelines_created_total
* Use `_total` naming convention.
* Add to metrics documentation.
-rw-r--r-- | app/services/ci/create_pipeline_service.rb | 2 | ||||
-rw-r--r-- | doc/administration/monitoring/prometheus/gitlab_metrics.md | 1 | ||||
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index 4f35255fb53..273386776fa 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -135,7 +135,7 @@ module Ci end def pipeline_created_counter - @pipeline_created_counter ||= Gitlab::Metrics.counter(:pipelines_created_count, "Pipelines created count") + @pipeline_created_counter ||= Gitlab::Metrics.counter(:pipelines_created_total, "Counter of pipelines created") end end end diff --git a/doc/administration/monitoring/prometheus/gitlab_metrics.md b/doc/administration/monitoring/prometheus/gitlab_metrics.md index 7c5505de8a2..6023112d615 100644 --- a/doc/administration/monitoring/prometheus/gitlab_metrics.md +++ b/doc/administration/monitoring/prometheus/gitlab_metrics.md @@ -39,6 +39,7 @@ In this experimental phase, only a few metrics are available: | filesystem_readable | Gauge | Whether or not the filesystem is readable | | http_requests_total | Counter | Rack request count | | http_request_duration_seconds | Histogram | HTTP response time from rack middleware | +| pipelines_created_total | Counter | Counter of pipelines created | | rack_uncaught_errors_total | Counter | Rack connections handling uncaught errors count | | redis_ping_timeout | Gauge | Whether or not the last redis ping timed out | | redis_ping_success | Gauge | Whether or not the last redis ping succeeded | diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 77c07b71c68..e71c462b99a 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -40,7 +40,7 @@ describe Ci::CreatePipelineService, :services do it 'increments the prometheus counter' do expect(Gitlab::Metrics).to receive(:counter) - .with(:pipelines_created_count, "Pipelines created count") + .with(:pipelines_created_total, "Counter of pipelines created") .and_call_original pipeline |