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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 8d504e557 fix: Correctly retrieve Prometheus pushgateway username and 
password from config (#2969)
8d504e557 is described below

commit 8d504e5574e431faca7aa03548e650ab7a9fc6a7
Author: Xuetao Li <[email protected]>
AuthorDate: Sat Aug 9 15:36:30 2025 +0800

    fix: Correctly retrieve Prometheus pushgateway username and password from 
config (#2969)
---
 metrics/prometheus/registry.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/metrics/prometheus/registry.go b/metrics/prometheus/registry.go
index 69f360b2e..0eec66e47 100644
--- a/metrics/prometheus/registry.go
+++ b/metrics/prometheus/registry.go
@@ -177,8 +177,8 @@ func (p *promMetricRegistry) exportPushgateway() {
                logger.Error("no pushgateway base url found in config path: 
metrics.prometheus.pushgateway.base-url, please check your config")
                return
        }
-       username := p.url.GetParam(constant.PrometheusPushgatewayBaseUrlKey, "")
-       password := p.url.GetParam(constant.PrometheusPushgatewayBaseUrlKey, "")
+       username := p.url.GetParam(constant.PrometheusPushgatewayUsernameKey, 
"")
+       password := p.url.GetParam(constant.PrometheusPushgatewayPasswordKey, 
"")
        job := p.url.GetParam(constant.PrometheusPushgatewayJobKey, 
constant.PrometheusDefaultJobName)
        pushInterval := 
p.url.GetParamByIntValue(constant.PrometheusPushgatewayPushIntervalKey, 
constant.PrometheusDefaultPushInterval)
        pusher := push.New(baseUrl, job).Gatherer(p.gather)

Reply via email to