diff --git a/ddtrace/contrib/falcon/middleware.py b/ddtrace/contrib/falcon/middleware.py index b563d612e6a..9c453923765 100644 --- a/ddtrace/contrib/falcon/middleware.py +++ b/ddtrace/contrib/falcon/middleware.py @@ -50,7 +50,7 @@ def process_response(self, req, resp, resource, req_succeeded=None): if not span: return # unexpected - status = httpx.normalize_status_code(resp.status) + status = resp.status.partition(" ")[0] # FIXME[matt] falcon does not map errors or unmatched routes # to proper status codes, so we we have to try to infer them diff --git a/ddtrace/ext/http.py b/ddtrace/ext/http.py index 39eb04f5ed0..86f6ea02fe0 100644 --- a/ddtrace/ext/http.py +++ b/ddtrace/ext/http.py @@ -17,7 +17,3 @@ # template render span type TEMPLATE = "template" - - -def normalize_status_code(code): - return code.split(" ")[0]