fix: add span.SetStatus to codersdk.Request (#6964)

This commit is contained in:
Colin Adler
2023-04-03 05:52:42 +00:00
committed by GitHub
parent 47afafa4d4
commit f4d16a1ae5
+1
View File
@@ -183,6 +183,7 @@ func (c *Client) Request(ctx context.Context, method, path string, body interfac
}
span.SetAttributes(httpconv.ClientResponse(resp)...)
span.SetStatus(httpconv.ClientStatus(resp.StatusCode))
// Copy the response body so we can log it if it's a loggable mime type.
var respBody []byte