This is an automated email from the ASF dual-hosted git repository.

justxuewei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/main by this push:
     new e9cc9ea9b fix Prometheus Pushgateway can not enable (#2594)
e9cc9ea9b is described below

commit e9cc9ea9b3afb4759460492bc9264d95274b0c07
Author: foghost <[email protected]>
AuthorDate: Fri Feb 23 13:22:02 2024 +0800

    fix Prometheus Pushgateway can not enable (#2594)
---
 metrics/options.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/metrics/options.go b/metrics/options.go
index 8824df657..58542cc57 100644
--- a/metrics/options.go
+++ b/metrics/options.go
@@ -76,6 +76,13 @@ func WithPrometheusExporterEnabled() Option {
        }
 }
 
+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

Reply via email to