From 866fbb1d770ad166af8cfb11a189370d02debcdf Mon Sep 17 00:00:00 2001 From: Stephen Collinson Date: Mon, 25 Sep 2023 16:05:03 +0100 Subject: [PATCH] pin version in testing span names changed https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1757 --- setup.py | 2 +- tests/test_http.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index dec62d2..48d87d9 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ "coverage", "pytest", "opentelemetry-sdk", - "opentelemetry-instrumentation-requests", + "opentelemetry-instrumentation-requests>=0.39b0", ], "instruments": PACKAGE_INFO["_instruments"], }, diff --git a/tests/test_http.py b/tests/test_http.py index 857a335..2183236 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -89,7 +89,7 @@ def test_no_match(self, container, web_session, memory_exporter): spans = memory_exporter.get_finished_spans() assert len(spans) == 1 - assert spans[0].name == "HTTP GET" + assert spans[0].name == "GET /missing" class TestNoEntrypointFired: @@ -121,7 +121,7 @@ def test_method_not_found(self, container, web_session, memory_exporter): span = spans[0] - assert spans[0].name == "HTTP GET" + assert spans[0].name == "GET /missing" assert not span.status.is_ok assert span.status.status_code == StatusCode.ERROR @@ -139,7 +139,7 @@ def test_method_not_allowed(self, container, web_session, memory_exporter): span = spans[0] - assert spans[0].name == "HTTP POST" + assert spans[0].name == "POST /resource" assert not span.status.is_ok assert span.status.status_code == StatusCode.ERROR