Skip to content

Commit b447c2e

Browse files
committed
Remove error logs in case API returns 4xx
Signed-off-by: Daniel Deluiggi <[email protected]>
1 parent 4f15011 commit b447c2e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## master / unreleased
44
* [CHANGE] Alertmanager: Local file disclosure vulnerability in OpsGenie configuration has been fixed. #5045
5+
* [CHANGE] Distributor/Ingester: Do not log push error for requests returning 4xx. #
56
* [ENHANCEMENT] Update Go version to 1.19.3. #4988
67
* [ENHANCEMENT] Querier: limit series query to only ingesters if `start` param is not specified. #4976
78
* [ENHANCEMENT] Query-frontend/scheduler: add a new limit `frontend.max-outstanding-requests-per-tenant` for configuring queue size per tenant. Started deprecating two flags `-query-scheduler.max-outstanding-requests-per-tenant` and `-querier.max-outstanding-requests-per-tenant`, and change their value default to 0. Now if both the old flag and new flag are specified, the old flag's queue size will be picked. #5005

pkg/util/push/push.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func Handler(maxRecvMsgSize int, sourceIPs *middleware.SourceIPExtractor, push F
4747
http.Error(w, err.Error(), http.StatusInternalServerError)
4848
return
4949
}
50-
if resp.GetCode() != 202 {
50+
if resp.GetCode()/100 == 5 {
5151
level.Error(logger).Log("msg", "push error", "err", err)
5252
}
5353
http.Error(w, string(resp.Body), int(resp.Code))

0 commit comments

Comments
 (0)