Skip to content

Commit

Permalink
Fix cortex query seconds total (#3589) (#3619)
Browse files Browse the repository at this point in the history
* Fixes `-config.expand-env` requires argument.
Fixes #3082

Signed-off-by: Wing924 <[email protected]>

* fix

Signed-off-by: Wing924 <[email protected]>

* Query-Frontend: cortex_query_seconds_total now return seconds not nanoseconds.

Signed-off-by: Wing924 <[email protected]>

* fix

Signed-off-by: Wing924 <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Marco Pracucci <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>

Co-authored-by: Wei He <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2020
1 parent e8dbbd3 commit 2111b0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## master / unreleased

## 1.6.0-rc.1

* [BUGFIX] Query-Frontend: `cortex_query_seconds_total` now return seconds not nanoseconds. #3589

## 1.6.0-rc.0

* [CHANGE] Query Frontend: deprecate `-querier.compress-http-responses` in favour of `-api.response-compression-enabled`. #3544
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0-rc.0
1.6.0-rc.1
2 changes: 1 addition & 1 deletion pkg/frontend/transport/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (f *Handler) reportQueryStats(r *http.Request, queryString url.Values, quer
}

// Track stats.
f.querySeconds.WithLabelValues(userID).Add(float64(stats.LoadWallTime()))
f.querySeconds.WithLabelValues(userID).Add(stats.LoadWallTime().Seconds())

// Log stats.
logMessage := append([]interface{}{
Expand Down

0 comments on commit 2111b0d

Please sign in to comment.