Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kochie <bjk@gitlab.com>2019-06-07 19:21:21 +0300
committerPaul Okstad <pokstad@gitlab.com>2019-06-07 19:21:21 +0300
commit27e8556d2a64f0aba0b7e625f563fe5ddfe6d4da (patch)
treef32a1ff4efcb0637d0097e48fa2fc557e4bd198e
parentb5a9350ce3d85b2ff6e6db029eb2373e9264b598 (diff)
Fix Prometheus metric naming errors
Fix Prometheus metric naming convention errors reported by `promtool check metrics`.
-rw-r--r--changelogs/unreleased/bjk-gitaly_promtool_check_metrics.yml5
-rw-r--r--doc/configuration/README.md2
-rw-r--r--internal/command/spawntoken.go2
-rw-r--r--internal/middleware/metadatahandler/metadatahandler.go2
-rw-r--r--internal/server/auth/auth.go2
-rw-r--r--internal/service/smarthttp/upload_pack.go2
-rw-r--r--internal/supervisor/monitor.go2
7 files changed, 11 insertions, 6 deletions
diff --git a/changelogs/unreleased/bjk-gitaly_promtool_check_metrics.yml b/changelogs/unreleased/bjk-gitaly_promtool_check_metrics.yml
new file mode 100644
index 000000000..f060b52ac
--- /dev/null
+++ b/changelogs/unreleased/bjk-gitaly_promtool_check_metrics.yml
@@ -0,0 +1,5 @@
+---
+title: Fix Prometheus metric naming errors
+merge_request: 1292
+author:
+type: fixed
diff --git a/doc/configuration/README.md b/doc/configuration/README.md
index 644e400e9..5ad56189d 100644
--- a/doc/configuration/README.md
+++ b/doc/configuration/README.md
@@ -75,7 +75,7 @@ transitioning = true
```
All authentication attempts are counted in Prometheus under
-the `gitaly_authentications` metric.
+the `gitaly_authentications_total` metric.
### Storage
diff --git a/internal/command/spawntoken.go b/internal/command/spawntoken.go
index fdadbc679..a3bfddeba 100644
--- a/internal/command/spawntoken.go
+++ b/internal/command/spawntoken.go
@@ -18,7 +18,7 @@ var (
spawnTimeoutCount = prometheus.NewCounter(
prometheus.CounterOpts{
- Name: "gitaly_spawn_timeout_count",
+ Name: "gitaly_spawn_timeouts_total",
Help: "Number of process spawn timeouts",
},
)
diff --git a/internal/middleware/metadatahandler/metadatahandler.go b/internal/middleware/metadatahandler/metadatahandler.go
index ca3690662..b4af28275 100644
--- a/internal/middleware/metadatahandler/metadatahandler.go
+++ b/internal/middleware/metadatahandler/metadatahandler.go
@@ -17,7 +17,7 @@ var (
prometheus.CounterOpts{
Namespace: "gitaly",
Subsystem: "service",
- Name: "client_requests",
+ Name: "client_requests_total",
Help: "Counter of client requests received by client, call_site, auth version, and response code",
},
[]string{"client_name", "call_site", "auth_version", "grpc_code"},
diff --git a/internal/server/auth/auth.go b/internal/server/auth/auth.go
index c83ddd615..0ac688ba8 100644
--- a/internal/server/auth/auth.go
+++ b/internal/server/auth/auth.go
@@ -16,7 +16,7 @@ import (
var (
authCount = prometheus.NewCounterVec(
prometheus.CounterOpts{
- Name: "gitaly_authentications",
+ Name: "gitaly_authentications_total",
Help: "Counts of of Gitaly request authentication attempts",
},
[]string{"enforced", "status"},
diff --git a/internal/service/smarthttp/upload_pack.go b/internal/service/smarthttp/upload_pack.go
index 60872fcbd..21b7e71c7 100644
--- a/internal/service/smarthttp/upload_pack.go
+++ b/internal/service/smarthttp/upload_pack.go
@@ -16,7 +16,7 @@ import (
var (
deepenCount = prometheus.NewCounter(
prometheus.CounterOpts{
- Name: "gitaly_smarthttp_deepen_count",
+ Name: "gitaly_smarthttp_deepen_requests_total",
Help: "Number of git-upload-pack requests processed that contained a 'deepen' message",
},
)
diff --git a/internal/supervisor/monitor.go b/internal/supervisor/monitor.go
index fc1ddb146..a5f609cf6 100644
--- a/internal/supervisor/monitor.go
+++ b/internal/supervisor/monitor.go
@@ -18,7 +18,7 @@ var (
)
healthCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
- Name: "gitaly_supervisor_health_checks",
+ Name: "gitaly_supervisor_health_checks_total",
Help: "Count of Gitaly supervisor health checks",
},
[]string{"name", "status"},