diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-09 06:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-09 06:09:24 +0300 |
commit | a25cab22f84ee674ebb32625a6da566acd454e8a (patch) | |
tree | f52667dd7f61cace3157fd55c1485cc2becbe3e3 /workhorse/internal/staticpages | |
parent | 77914793a349059bf523b131fc925b34349d6884 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/staticpages')
-rw-r--r-- | workhorse/internal/staticpages/error_pages.go | 7 |
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 |