Prometheus: Set Status(Code) on backend response (#80806)
Sets that status code on backend data responses in prometheus to match the status code returned by prometheus. If the failure is below HTTP/Application Layer, Bad Gateway is returned (502). --------- Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
This commit is contained in:
co-authored by
ismail simsek
parent
fb4125dfbb
commit
02e2e1c64e
@@ -32,6 +32,7 @@ func (s *QueryData) parseResponse(ctx context.Context, q *models.Query, res *htt
|
||||
r := converter.ReadPrometheusStyleResult(iter, converter.Options{
|
||||
Dataplane: s.enableDataplane,
|
||||
})
|
||||
r.Status = backend.Status(res.StatusCode)
|
||||
|
||||
// Add frame to attach metadata
|
||||
if len(r.Frames) == 0 && !q.ExemplarQuery {
|
||||
|
||||
Reference in New Issue
Block a user