Skip to content

Commit a88b5a0

Browse files
committed
Update urllib3 implementation
1 parent a0159a8 commit a88b5a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def instrumented_urlopen(wrapped, instance, args, kwargs):
225225
headers = _prepare_headers(kwargs)
226226
body = _get_url_open_arg("body", args, kwargs)
227227

228-
span_name = f"HTTP {method.strip()}"
228+
span_name = method.strip()
229229
span_attributes = {
230230
SpanAttributes.HTTP_METHOD: method,
231231
SpanAttributes.HTTP_URL: url,

instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_integration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def assert_success_span(
8787

8888
span = self.assert_span()
8989
self.assertIs(trace.SpanKind.CLIENT, span.kind)
90-
self.assertEqual("HTTP GET", span.name)
90+
self.assertEqual("GET", span.name)
9191

9292
attributes = {
9393
SpanAttributes.HTTP_METHOD: "GET",

instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_ip_support.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def assert_success_span(
7777

7878
span = self.assert_span()
7979
self.assertIs(trace.SpanKind.CLIENT, span.kind)
80-
self.assertEqual("HTTP GET", span.name)
80+
self.assertEqual("GET", span.name)
8181

8282
attributes = {
8383
"http.status_code": 200,

0 commit comments

Comments
 (0)