From 8a75b438be06607e10dbf9a6b8a16618bde2b560 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Thu, 21 Nov 2024 14:37:16 -0800 Subject: [PATCH 1/3] Replace assertInstInfo with assertInstScope --- .../tests/test_aiopg_integration.py | 8 ++++---- .../tests/test_cassandra_integration.py | 2 +- .../tests/test_elasticsearch.py | 4 ++-- .../tests/test_aio_client_interceptor.py | 8 ++++---- .../tests/test_aio_server_interceptor.py | 14 +++++++------- .../tests/test_client_interceptor.py | 10 +++++----- .../tests/test_client_interceptor_filter.py | 18 +++++++++--------- .../tests/test_server_interceptor.py | 14 +++++++------- .../tests/test_server_interceptor_filter.py | 4 ++-- .../tests/test_httpx_integration.py | 10 +++++----- .../tests/test_mysql_integration.py | 2 +- .../tests/test_mysqlclient_integration.py | 2 +- .../tests/test_psycopg_integration.py | 8 ++++---- .../tests/test_psycopg2_integration.py | 2 +- .../tests/test_pymysql_integration.py | 2 +- .../tests/test_requests_integration.py | 2 +- .../tests/test_urllib_integration.py | 8 ++++---- 17 files changed, 59 insertions(+), 59 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py b/instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py index c497ae4564..f32ef3514b 100644 --- a/instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py +++ b/instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py @@ -67,7 +67,7 @@ def test_instrumentor_connect(self): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.aiopg ) @@ -96,7 +96,7 @@ async def _ctx_manager_connect(): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.aiopg ) @@ -117,7 +117,7 @@ def test_instrumentor_create_pool(self): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.aiopg ) @@ -148,7 +148,7 @@ async def _ctx_manager_pool(): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.aiopg ) diff --git a/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py b/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py index ed488ab07f..9a36bb9069 100644 --- a/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py +++ b/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py @@ -78,7 +78,7 @@ def test_instrumentor( span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.cassandra ) self.assertEqual(span.name, "Cassandra") diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/tests/test_elasticsearch.py b/instrumentation/opentelemetry-instrumentation-elasticsearch/tests/test_elasticsearch.py index b7e24d87c9..8a707c8c2a 100644 --- a/instrumentation/opentelemetry-instrumentation-elasticsearch/tests/test_elasticsearch.py +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/tests/test_elasticsearch.py @@ -114,7 +114,7 @@ def test_instrumentor(self, request_mock): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.elasticsearch ) @@ -608,7 +608,7 @@ def test_bulk(self, request_mock): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.elasticsearch ) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_client_interceptor.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_client_interceptor.py index 7ae1649149..4cd19da4af 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_client_interceptor.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_client_interceptor.py @@ -114,7 +114,7 @@ async def test_unary_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -142,7 +142,7 @@ async def test_unary_stream(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -170,7 +170,7 @@ async def test_stream_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -200,7 +200,7 @@ async def test_stream_stream(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py index 050f6f8d13..ee917ca26c 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py @@ -105,7 +105,7 @@ async def request(channel): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -164,7 +164,7 @@ async def request(channel): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -217,7 +217,7 @@ async def request(channel): self.assertIs(parent_span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( parent_span, opentelemetry.instrumentation.grpc ) @@ -263,7 +263,7 @@ async def request(channel): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -318,7 +318,7 @@ async def request(channel): self.assertIs(parent_span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( parent_span, opentelemetry.instrumentation.grpc ) @@ -514,7 +514,7 @@ async def request(channel): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -579,7 +579,7 @@ async def request(channel): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py index 38759352b3..9fb922a615 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py @@ -111,7 +111,7 @@ def test_unary_unary_future(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -125,7 +125,7 @@ def test_unary_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -151,7 +151,7 @@ def test_unary_stream(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -177,7 +177,7 @@ def test_stream_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -205,7 +205,7 @@ def test_stream_stream(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor_filter.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor_filter.py index b6ae975dff..81e8d708f2 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor_filter.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor_filter.py @@ -116,7 +116,7 @@ def test_unary_unary_future(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -130,7 +130,7 @@ def test_unary_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -260,7 +260,7 @@ def test_unary_unary_future(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -274,7 +274,7 @@ def test_unary_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -443,7 +443,7 @@ def test_unary_unary_future(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -457,7 +457,7 @@ def test_unary_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -483,7 +483,7 @@ def test_unary_stream(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -509,7 +509,7 @@ def test_stream_unary(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -537,7 +537,7 @@ def test_stream_stream(self): self.assertIs(span.kind, trace.SpanKind.CLIENT) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor.py index de79269894..08aa16187a 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor.py @@ -120,7 +120,7 @@ def handler(request, context): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -188,7 +188,7 @@ def test_create_span(self): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -252,7 +252,7 @@ def SimpleMethod(self, request, context): self.assertIs(parent_span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( parent_span, opentelemetry.instrumentation.grpc ) @@ -307,7 +307,7 @@ def test_create_span_streaming(self): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -371,7 +371,7 @@ def ServerStreamingMethod(self, request, context): self.assertIs(parent_span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( parent_span, opentelemetry.instrumentation.grpc ) @@ -594,7 +594,7 @@ def unset_status_handler(request, context): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -626,7 +626,7 @@ def unset_status_handler(request, context): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor_filter.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor_filter.py index 95e70236cb..6a0081c4af 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor_filter.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor_filter.py @@ -109,7 +109,7 @@ def handler(request, context): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) @@ -195,7 +195,7 @@ def test_create_span(self): self.assertIs(span.kind, trace.SpanKind.SERVER) # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.grpc ) diff --git a/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py b/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py index 0fdab381d5..148fe27893 100644 --- a/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py +++ b/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py @@ -216,7 +216,7 @@ def test_basic(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.httpx ) @@ -240,7 +240,7 @@ def test_nonstandard_http_method(self): self.assertIs(span.status.status_code, trace.StatusCode.ERROR) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.httpx ) @@ -269,7 +269,7 @@ def test_nonstandard_http_method_new_semconv(self): self.assertIs(span.status.status_code, trace.StatusCode.ERROR) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.httpx ) @@ -309,7 +309,7 @@ def test_basic_new_semconv(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.httpx ) @@ -350,7 +350,7 @@ def test_basic_both_semconv(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.httpx ) diff --git a/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py b/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py index 3614febffd..79399cce7f 100644 --- a/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py +++ b/instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py @@ -50,7 +50,7 @@ def test_instrumentor(self, mock_connect): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.mysql ) diff --git a/instrumentation/opentelemetry-instrumentation-mysqlclient/tests/test_mysqlclient_integration.py b/instrumentation/opentelemetry-instrumentation-mysqlclient/tests/test_mysqlclient_integration.py index 5c375ac4aa..ae221f68f4 100644 --- a/instrumentation/opentelemetry-instrumentation-mysqlclient/tests/test_mysqlclient_integration.py +++ b/instrumentation/opentelemetry-instrumentation-mysqlclient/tests/test_mysqlclient_integration.py @@ -44,7 +44,7 @@ def test_instrumentor(self, mock_connect): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.mysqlclient ) diff --git a/instrumentation/opentelemetry-instrumentation-psycopg/tests/test_psycopg_integration.py b/instrumentation/opentelemetry-instrumentation-psycopg/tests/test_psycopg_integration.py index dc9969ba8c..4ddaad9174 100644 --- a/instrumentation/opentelemetry-instrumentation-psycopg/tests/test_psycopg_integration.py +++ b/instrumentation/opentelemetry-instrumentation-psycopg/tests/test_psycopg_integration.py @@ -182,7 +182,7 @@ def test_instrumentor(self): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.psycopg ) @@ -213,7 +213,7 @@ def test_instrumentor_with_connection_class(self): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.psycopg ) @@ -407,7 +407,7 @@ async def test_async_connection(): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.psycopg ) @@ -435,7 +435,7 @@ async def test_async_connection(): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.psycopg ) diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py b/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py index 6671073043..9a6a5ff2fa 100644 --- a/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py +++ b/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py @@ -100,7 +100,7 @@ def test_instrumentor(self): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.psycopg2 ) diff --git a/instrumentation/opentelemetry-instrumentation-pymysql/tests/test_pymysql_integration.py b/instrumentation/opentelemetry-instrumentation-pymysql/tests/test_pymysql_integration.py index 3ba5ee2356..82294236f0 100644 --- a/instrumentation/opentelemetry-instrumentation-pymysql/tests/test_pymysql_integration.py +++ b/instrumentation/opentelemetry-instrumentation-pymysql/tests/test_pymysql_integration.py @@ -45,7 +45,7 @@ def test_instrumentor(self, mock_connect): span = spans_list[0] # Check version and name in span's instrumentation info - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.pymysql ) diff --git a/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py index a5cb8927ae..366cd0c233 100644 --- a/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py +++ b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py @@ -166,7 +166,7 @@ def test_basic(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.requests ) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py index 8ac0284939..b085cc50d5 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py @@ -158,7 +158,7 @@ def test_basic(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.urllib ) @@ -182,7 +182,7 @@ def test_basic_new_semconv(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.urllib ) @@ -209,7 +209,7 @@ def test_basic_both_semconv(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.urllib ) @@ -344,7 +344,7 @@ def test_response_code_none(self): self.assertIs(span.status.status_code, trace.StatusCode.UNSET) - self.assertEqualSpanInstrumentationInfo( + self.assertEqualSpanInstrumentationScope( span, opentelemetry.instrumentation.urllib ) From 625691cfd900c53bd87fe06cbfe213e8887ef3be Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Thu, 21 Nov 2024 14:48:14 -0800 Subject: [PATCH 2/3] Update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5339972d7..1e31b4e73a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#3025](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3025)) - `opentelemetry-instrumentation-httpx`: Check if mount transport is none before wrap it ([#3022](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3022)) +- Replace all instrumentor unit test `assertEqualSpanInstrumentationInfo` calls with `assertEqualSpanInstrumentationScope` calls + ([#3037](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3037)) ### Breaking changes From 70bac8c71a7f97c5899c49a32719268892f4415a Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Thu, 21 Nov 2024 14:48:35 -0800 Subject: [PATCH 3/3] Fix order of other changelog entries --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e31b4e73a..173abf88f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#3027](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3027)) - `opentelemetry-instrumentation-mysqlclient` Add sqlcommenter support ([#2941](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2941)) +- `opentelemetry-instrumentation-pymysql` Add sqlcommenter support + ([#2942](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2942)) ### Fixed @@ -60,8 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2635](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2635)) - `opentelemetry-instrumentation` Add support for string based dotted module paths in unwrap ([#2919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2919)) -- `opentelemetry-instrumentation-pymysql` Add sqlcommenter support - ([#2942](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2942)) ### Fixed