Skip to content

Commit

Permalink
https://github.com/kedacore/keda/issues/2214
Browse files Browse the repository at this point in the history
  • Loading branch information
Siva Guruvareddiar committed Dec 26, 2023
1 parent 319a8c1 commit f60c1f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/scalers/prometheus_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (s *prometheusScaler) ExecutePromQuery(ctx context.Context) (float64, error
queryEscaped := url_pkg.QueryEscape(s.metadata.query)
url := fmt.Sprintf("%s/api/v1/query?query=%s&time=%s", s.metadata.serverAddress, queryEscaped, t)

s.logger.Info("Prometheues URL ", url)
s.logger.Info("Prometheues URL ", "url", url)

// set 'namespace' parameter for namespaced Prometheus requests (e.g. for Thanos Querier)
if s.metadata.namespace != "" {
Expand Down Expand Up @@ -330,7 +330,7 @@ func (s *prometheusScaler) ExecutePromQuery(ctx context.Context) (float64, error
}
defer r.Body.Close()

s.logger.Info("Prometheues query status code ", r.StatusCode)
s.logger.Info("Prometheues query status code ", "code", r.StatusCode)

if !(r.StatusCode >= 200 && r.StatusCode <= 299) {
err := fmt.Errorf("prometheus query api returned error. status: %d response: %s", r.StatusCode, string(b))
Expand Down Expand Up @@ -385,7 +385,7 @@ func (s *prometheusScaler) ExecutePromQuery(ctx context.Context) (float64, error
return -1, err
}

s.logger.Info(" value ", v)
s.logger.Info(" value ", " value", v)
return v, nil
}

Expand Down

0 comments on commit f60c1f3

Please sign in to comment.