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

This commit is contained in:
Sven Grossmann 2024-01-23 11:16:29 +01:00 committed by GitHub
parent 84e6dc6368
commit b315c5e54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {