diff options
author | Igor Wiedler <iwiedler@gitlab.com> | 2021-03-12 14:42:08 +0300 |
---|---|---|
committer | Igor Wiedler <iwiedler@gitlab.com> | 2021-03-16 13:05:19 +0300 |
commit | f5df24b6578aded39f69107a768925b6d34e3ebd (patch) | |
tree | 992f9cb25ed7a269eeec077ac8a3b8c22411f8e6 /app.go | |
parent | b2bebb9733332031654f203a42c9912831d49a15 (diff) |
Pass metrics into limiter to better decouple the instrumentation
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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, |