commit | e9cc9ea9b3afb4759460492bc9264d95274b0c07 | [log] [tgz] |
---|---|---|
author | foghost <foghost.cn@gmail.com> | Fri Feb 23 13:22:02 2024 +0800 |
committer | GitHub <noreply@github.com> | Fri Feb 23 13:22:02 2024 +0800 |
tree | e38ab541148caa66d66932c8777963b41b113a78 | |
parent | abb51f58228a8ef1ef1e33817f5f28bbc3859574 [diff] |
fix Prometheus Pushgateway can not enable (#2594)
diff --git a/metrics/options.go b/metrics/options.go index 8824df6..58542cc 100644 --- a/metrics/options.go +++ b/metrics/options.go
@@ -76,6 +76,13 @@ } } +func WithPrometheusPushgatewayEnabled() Option { + return func(opts *Options) { + enabled := true + opts.Metrics.Prometheus.Pushgateway.Enabled = &enabled + } +} + func WithPrometheusGatewayUrl(url string) Option { return func(opts *Options) { opts.Metrics.Prometheus.Pushgateway.BaseUrl = url