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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-09 06:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-09 06:09:24 +0300
commita25cab22f84ee674ebb32625a6da566acd454e8a (patch)
treef52667dd7f61cace3157fd55c1485cc2becbe3e3 /workhorse/internal/staticpages
parent77914793a349059bf523b131fc925b34349d6884 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/staticpages')
-rw-r--r--workhorse/internal/staticpages/error_pages.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/workhorse/internal/staticpages/error_pages.go b/workhorse/internal/staticpages/error_pages.go
index 6ab97f396f8..3cc89d9f811 100644
--- a/workhorse/internal/staticpages/error_pages.go
+++ b/workhorse/internal/staticpages/error_pages.go
@@ -8,12 +8,13 @@ import (
"path/filepath"
"github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
var (
- staticErrorResponses = prometheus.NewCounterVec(
+ staticErrorResponses = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "gitlab_workhorse_static_error_responses",
Help: "How many HTTP responses have been changed to a static error page, by HTTP status code.",
@@ -30,10 +31,6 @@ const (
ErrorFormatText
)
-func init() {
- prometheus.MustRegister(staticErrorResponses)
-}
-
type errorPageResponseWriter struct {
rw http.ResponseWriter
status int