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
path: root/app.go
diff options
context:
space:
mode:
authorIgor Wiedler <iwiedler@gitlab.com>2021-03-12 14:42:08 +0300
committerIgor Wiedler <iwiedler@gitlab.com>2021-03-16 13:05:19 +0300
commitf5df24b6578aded39f69107a768925b6d34e3ebd (patch)
tree992f9cb25ed7a269eeec077ac8a3b8c22411f8e6 /app.go
parentb2bebb9733332031654f203a42c9912831d49a15 (diff)
Pass metrics into limiter to better decouple the instrumentation
Diffstat (limited to 'app.go')
-rw-r--r--app.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/app.go b/app.go
index 3df55b3e..c5555fc0 100644
--- a/app.go
+++ b/app.go
@@ -361,7 +361,12 @@ func (a *theApp) Run() {
var limiter *netutil.Limiter
if a.config.General.MaxConns > 0 {
- limiter = netutil.NewLimiter(a.config.General.MaxConns)
+ limiter = netutil.NewLimiterWithMetrics(
+ a.config.General.MaxConns,
+ metrics.LimitListenerMaxConns,
+ metrics.LimitListenerConcurrentConns,
+ metrics.LimitListenerWaitingConns,
+ )
}
// Use a common pipeline to use a single instance of each handler,