Skip to content

Commit

Permalink
Log remote write errors as they happen (#102)
Browse files Browse the repository at this point in the history
Signed-off-by: Saswata Mukherjee <[email protected]>
  • Loading branch information
saswatamcode authored Oct 18, 2024
1 parent df2ff18 commit 5d86b52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions metrics/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,8 @@ func (c *Client) Store(ctx context.Context, req *prompb.WriteRequest) error {
line = scanner.Text()
}
err = fmt.Errorf("server returned HTTP status %s: %s", httpResp.Status, line)
log.Println(err)
}
if httpResp.StatusCode/100 == 5 {
return err
}

return err
}

0 comments on commit 5d86b52

Please sign in to comment.