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

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2021-10-07 07:28:15 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2021-10-14 14:32:38 +0300
commit98e38acc90217a7a5bdb23b048c10d47d6dee1f7 (patch)
treea73354f15d6598470df83e95fbf87f83eb5f06c6 /metrics
parent7e8f58590804c78f2c27f51212781d50bb1321ed (diff)
feat: add panic handler middleware
Changelog: added
Diffstat (limited to 'metrics')
-rw-r--r--metrics/metrics.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go
index 23962dc4..680f7a05 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -185,6 +185,14 @@ var (
},
)
+ // PanicRecoveredCount measures the number of times GitLab Pages has recovered from a panic
+ PanicRecoveredCount = prometheus.NewCounter(
+ prometheus.CounterOpts{
+ Name: "gitlab_pages_panic_recovered_count",
+ Help: "The number of panics the service has recovered from.",
+ },
+ )
+
// RateLimitSourceIPCacheRequests is the number of cache hits/misses
RateLimitSourceIPCacheRequests = prometheus.NewCounterVec(
prometheus.CounterOpts{
@@ -239,6 +247,7 @@ func MustRegister() {
LimitListenerMaxConns,
LimitListenerConcurrentConns,
LimitListenerWaitingConns,
+ PanicRecoveredCount,
RateLimitSourceIPCacheRequests,
RateLimitSourceIPCachedEntries,
RateLimitSourceIPBlockedCount,