Skip to content

Commit

Permalink
Merge pull request DataDog#83 from brettlangdon/brettlangdon/requests…
Browse files Browse the repository at this point in the history
….span.error.sqwished

[requests] ensure span.error is an int
  • Loading branch information
clutchski authored Oct 31, 2016
2 parents 8a9a7a5 + 3d0a5d0 commit 1e8cabc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ddtrace/contrib/requests/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def _apply_tags(span, method, url, response):
span.set_tag(http.URL, url)
if response is not None:
span.set_tag(http.STATUS_CODE, response.status_code)
span.error = 500 <= response.status_code
# `span.error` must be an integer
span.error = int(500 <= response.status_code)


class TracedSession(requests.Session):
Expand Down

0 comments on commit 1e8cabc

Please sign in to comment.