Skip to content

Commit

Permalink
add request id to proxy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 9, 2018
1 parent 745d4f2 commit 2451bb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ func (p *Proxy) Restart() error {

// RoundTrip implementation.
func (p *Proxy) RoundTrip(r *http.Request) (*http.Response, error) {
id := r.Header.Get("X-Request-Id")
ctx = ctx.WithField("id", id)

res, err := p.transport.RoundTrip(r)

// timeout error
Expand Down

0 comments on commit 2451bb8

Please sign in to comment.