Skip to content

Commit

Permalink
Add logging to test error setting functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 committed Sep 19, 2024
1 parent 3e1dffa commit 753bd7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/net/http/roundtripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func (rt *roundTripper) RoundTrip(req *http.Request) (res *http.Response, err er
// TODO: Client spans should only have errors on 4xx, so change this to just 4xx
if sc := res.StatusCode / 100; sc == 5 || sc == 4 {
span.SetTag("http.errors", res.Status)
fmt.Println("MTOFF: Setting error")
span.SetTag(ext.Error, fmt.Errorf("%d: %s", res.StatusCode, http.StatusText(res.StatusCode)))
}
}
Expand Down

0 comments on commit 753bd7c

Please sign in to comment.