File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import (
2020 "github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile"
2121 "github.com/caddyserver/caddy/v2/modules/caddyhttp"
2222 "github.com/dunglas/mercure"
23- "github.com/prometheus/client_golang/prometheus"
2423 "go.uber.org/zap"
2524 "go.uber.org/zap/zapcore"
2625)
@@ -29,7 +28,6 @@ const defaultHubURL = "/.well-known/mercure"
2928
3029var (
3130 ErrCompatibility = errors .New ("compatibility mode only supports protocol version 7" )
32- metrics = mercure .NewPrometheusMetrics (prometheus .DefaultRegisterer ) //nolint:gochecknoglobals
3331
3432 // Deprecated: use transports Caddy modules.
3533 transports = caddy .NewUsagePool () //nolint:gochecknoglobals
@@ -189,6 +187,8 @@ func createTransportLegacy(m *Mercure) (mercure.Transport, error) {
189187
190188//nolint:wrapcheck
191189func (m * Mercure ) Provision (ctx caddy.Context ) error { //nolint:funlen,gocognit
190+ metrics := mercure .NewPrometheusMetrics (ctx .GetMetricsRegistry ())
191+
192192 if err := m .populateJWTConfig (); err != nil {
193193 return err
194194 }
You can’t perform that action at this time.
0 commit comments