diff options
-rw-r--r-- | internal/connectioncounter/connectioncounter.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/connectioncounter/connectioncounter.go b/internal/connectioncounter/connectioncounter.go index 21e28cf1b..0fbf3210b 100644 --- a/internal/connectioncounter/connectioncounter.go +++ b/internal/connectioncounter/connectioncounter.go @@ -20,6 +20,9 @@ func init() { prometheus.MustRegister(connTotal) } +// New returns a listener which increments a prometheus counter on each +// accepted connection. Use cType to specify the connection type, this is +// a prometheus label. func New(cType string, l net.Listener) net.Listener { return &countingListener{ cType: cType, |