Loki: Also log `statusSource` in error case (#81040)

pull/80709/head^2
Sven Grossmann 1 year ago committed by GitHub
parent 84e6dc6368
commit b315c5e54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      pkg/tsdb/loki/api.go

@ -205,7 +205,7 @@ func (api *LokiAPI) DataQuery(ctx context.Context, query lokiQuery, responseOpts
Error: err,
ErrorSource: backend.ErrorSourceFromHTTPStatus(resp.StatusCode),
}
lp = append(lp, "status", "error", "error", err)
lp = append(lp, "status", "error", "error", err, "statusSource", res.ErrorSource)
api.log.Error("Error received from Loki", lp...)
return &res, nil
} else {

Loading…
Cancel
Save