From 76e75018b53659b5416c2f29f210b421f17fb291 Mon Sep 17 00:00:00 2001 From: crysmags Date: Tue, 29 Jun 2021 12:00:41 -0400 Subject: [PATCH 1/6] removing ddtrace.ext.http.normalize_status_code, jira APMPY-617 --- ddtrace/ext/http.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ddtrace/ext/http.py b/ddtrace/ext/http.py index 39eb04f5ed0..f5d37bb3e95 100644 --- a/ddtrace/ext/http.py +++ b/ddtrace/ext/http.py @@ -18,6 +18,3 @@ # template render span type TEMPLATE = "template" - -def normalize_status_code(code): - return code.split(" ")[0] From fd4fff02f1d6f1f381f5d48d06fba60980e5573a Mon Sep 17 00:00:00 2001 From: crysmags Date: Tue, 29 Jun 2021 12:08:55 -0400 Subject: [PATCH 2/6] removing ddtrace.ext.http.normalize_status_code, jira APMPY-617 --- ddtrace/contrib/falcon/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddtrace/contrib/falcon/middleware.py b/ddtrace/contrib/falcon/middleware.py index b563d612e6a..6cc0c4042b3 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.split(" ")[0] # FIXME[matt] falcon does not map errors or unmatched routes # to proper status codes, so we we have to try to infer them From e27e9302e3ad53ad134b6839624870d78317ace2 Mon Sep 17 00:00:00 2001 From: crysmags Date: Tue, 29 Jun 2021 12:33:59 -0400 Subject: [PATCH 3/6] CI checks --- ddtrace/ext/http.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ddtrace/ext/http.py b/ddtrace/ext/http.py index f5d37bb3e95..a3ee2d25aec 100644 --- a/ddtrace/ext/http.py +++ b/ddtrace/ext/http.py @@ -16,5 +16,4 @@ VERSION = "http.version" # template render span type -TEMPLATE = "template" - +TEMPLATE = "template" \ No newline at end of file From 31815b8c5bddcee50f560766463659694f960731 Mon Sep 17 00:00:00 2001 From: crysmags Date: Tue, 29 Jun 2021 12:43:16 -0400 Subject: [PATCH 4/6] CI checks --- ddtrace/ext/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ddtrace/ext/http.py b/ddtrace/ext/http.py index a3ee2d25aec..f5d37bb3e95 100644 --- a/ddtrace/ext/http.py +++ b/ddtrace/ext/http.py @@ -16,4 +16,5 @@ VERSION = "http.version" # template render span type -TEMPLATE = "template" \ No newline at end of file +TEMPLATE = "template" + From 6ebc69724df4d386d49d201a311bd474e8be23dd Mon Sep 17 00:00:00 2001 From: crysmags Date: Tue, 29 Jun 2021 13:45:16 -0400 Subject: [PATCH 5/6] black formatting --- ddtrace/ext/http.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ddtrace/ext/http.py b/ddtrace/ext/http.py index f5d37bb3e95..86f6ea02fe0 100644 --- a/ddtrace/ext/http.py +++ b/ddtrace/ext/http.py @@ -17,4 +17,3 @@ # template render span type TEMPLATE = "template" - From 0bdfc0a44ed04fd093a704d131891bd00f38cdc1 Mon Sep 17 00:00:00 2001 From: crysmags Date: Tue, 29 Jun 2021 13:47:29 -0400 Subject: [PATCH 6/6] updating to use partition --- ddtrace/contrib/falcon/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddtrace/contrib/falcon/middleware.py b/ddtrace/contrib/falcon/middleware.py index 6cc0c4042b3..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 = resp.status.split(" ")[0] + 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