Skip to content

Commit

Permalink
fix: debug requests with request context, not background context
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Feb 17, 2025
1 parent 5023418 commit 6623616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/httpclient/client_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (c *loggingClient) Do(request *http.Request) (*http.Response, error) {
l = l.With("req.body", string(body))
}

l.Debug("executing request")
l.DebugContext(request.Context(), "executing request")

response, err := c.inner.Do(request)

Expand All @@ -53,7 +53,7 @@ func (c *loggingClient) Do(request *http.Request) (*http.Response, error) {
}
}

l.Debug("received response")
l.DebugContext(request.Context(), "received response")

return response, err
}

0 comments on commit 6623616

Please sign in to comment.