Skip to content

Commit 508f991

Browse files
removing ddtrace.ext.http.normalize_status_code (#2595)
* removing ddtrace.ext.http.normalize_status_code, jira APMPY-617 * removing ddtrace.ext.http.normalize_status_code, jira APMPY-617 * CI checks * CI checks * black formatting * updating to use partition Co-authored-by: Brett Langdon <[email protected]>
1 parent 74c1df8 commit 508f991

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ddtrace/contrib/falcon/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def process_response(self, req, resp, resource, req_succeeded=None):
5050
if not span:
5151
return # unexpected
5252

53-
status = httpx.normalize_status_code(resp.status)
53+
status = resp.status.partition(" ")[0]
5454

5555
# FIXME[matt] falcon does not map errors or unmatched routes
5656
# to proper status codes, so we we have to try to infer them

ddtrace/ext/http.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,3 @@
1717

1818
# template render span type
1919
TEMPLATE = "template"
20-
21-
22-
def normalize_status_code(code):
23-
return code.split(" ")[0]

0 commit comments

Comments
 (0)