Skip to content

Commit

Permalink
metrics: revert changes for Postgres
Browse files Browse the repository at this point in the history
Signed-off-by: wenhuwang <[email protected]>
  • Loading branch information
wenhuwang committed Aug 19, 2024
1 parent 7f8930b commit c95844e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (ms *Metrics) createCollector(config ExporterConfig) (prometheus.Collector,
switch config.Type {

case model.ApplicationTypePostgres:
userPass := fmt.Sprintf("%s:%s", config.Credentials.Username, config.Credentials.Password)
userPass := url.UserPassword(config.Credentials.Username, config.Credentials.Password)
query := url.Values{}
query.Set("connect_timeout", "1")
query.Set("statement_timeout", strconv.Itoa(int(timeout.Milliseconds())))
Expand Down

0 comments on commit c95844e

Please sign in to comment.