feat(coderd): add workspace timings endpoint (#14648)

This commit is contained in:
Bruno Quaresma
2024-09-16 16:31:05 -03:00
committed by GitHub
parent c330af0e4d
commit 705b9ccda8
19 changed files with 640 additions and 2 deletions
+3
View File
@@ -192,6 +192,9 @@ func prefixLines(prefix, s []byte) []byte {
// Request performs a HTTP request with the body provided. The caller is
// responsible for closing the response body.
func (c *Client) Request(ctx context.Context, method, path string, body interface{}, opts ...RequestOption) (*http.Response, error) {
if ctx == nil {
return nil, xerrors.Errorf("context should not be nil")
}
ctx, span := tracing.StartSpanWithName(ctx, tracing.FuncNameSkip(1))
defer span.End()