Skip to content

Commit 2111b0d

Browse files
jtlisiWing924pracucci
authored
Fix cortex query seconds total (#3589) (#3619)
* 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]>
1 parent e8dbbd3 commit 2111b0d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## master / unreleased
44

5+
## 1.6.0-rc.1
6+
7+
* [BUGFIX] Query-Frontend: `cortex_query_seconds_total` now return seconds not nanoseconds. #3589
8+
59
## 1.6.0-rc.0
610

711
* [CHANGE] Query Frontend: deprecate `-querier.compress-http-responses` in favour of `-api.response-compression-enabled`. #3544

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.0-rc.0
1+
1.6.0-rc.1

pkg/frontend/transport/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (f *Handler) reportQueryStats(r *http.Request, queryString url.Values, quer
152152
}
153153

154154
// Track stats.
155-
f.querySeconds.WithLabelValues(userID).Add(float64(stats.LoadWallTime()))
155+
f.querySeconds.WithLabelValues(userID).Add(stats.LoadWallTime().Seconds())
156156

157157
// Log stats.
158158
logMessage := append([]interface{}{

0 commit comments

Comments
 (0)