Skip to content

Commit

Permalink
log http results even on err
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott committed Feb 28, 2024
1 parent 0589996 commit 7375e3b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/frontend/search_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ func newSearchHTTPHandler(cfg Config, next pipeline.AsyncRoundTripper[*http.Resp
rt := pipeline.NewHTTPCollector(next, combiner)

resp, err := rt.RoundTrip(req)
if err != nil {
return nil, err
}

// ask for the typed diff and use that for the SLO hook. it will have up to date metrics
var bytesProcessed uint64
Expand All @@ -121,7 +118,7 @@ func newSearchHTTPHandler(cfg Config, next pipeline.AsyncRoundTripper[*http.Resp
duration := time.Since(start)
postSLOHook(resp, tenant, bytesProcessed, duration, err)
logShardedResults(logger, tenant, duration.Seconds(), searchReq, searchResp, err)
return resp, nil
return resp, err
})
}

Expand Down

0 comments on commit 7375e3b

Please sign in to comment.