Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* [BUGFIX] Ring: fix bug where instances may appear unhealthy in the hash ring web UI even though they are not. #1933
* [BUGFIX] API: gzip is now enforced when identity encoding is explicitly rejected. #1864
* [BUGFIX] Fix panic at startup when Mimir is running in monolithic mode and query sharding is enabled. #2036
* [BUGFIX] Ruler: report failed evaluation metric for any 5xx status code returned by the query-frontend when remote operational mode is enabled. #2053

### Mixin

Expand Down
5 changes: 2 additions & 3 deletions pkg/ruler/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package ruler
import (
"context"
"errors"
"net/http"
"time"

"github.com/go-kit/log"
Expand Down Expand Up @@ -151,9 +150,9 @@ func MetricsQueryFunc(qf rules.QueryFunc, queries, failedQueries prometheus.Coun
return result, origErr

} else if err != nil {
// When remote querier enabled, only consider failed queries those returning a 500 status code.
// When remote querier enabled, only consider failed queries those returning a 5xx status code.
st, ok := status.FromError(err)
if ok && st.Code() == http.StatusInternalServerError {
if ok && st.Code()/100 == 5 {
failedQueries.Inc()
}
}
Expand Down