diff --git a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py index 318f36c4d..810ee930d 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py @@ -277,9 +277,7 @@ class TestClientProto(TestBase): previous_propagator = get_global_textmap() try: set_global_textmap(MockTextMapPropagator()) - interceptor = OpenTelemetryClientInterceptor( - trace._DefaultTracer() - ) + interceptor = OpenTelemetryClientInterceptor(trace.NoOpTracer()) carrier = tuple() diff --git a/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py b/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py index 4c4705dc9..4cf0b8b37 100644 --- a/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py +++ b/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py @@ -359,7 +359,7 @@ class BaseTestCases: def test_not_recording(self): with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span: transport = self.create_transport( - tracer_provider=trace._DefaultTracerProvider() + tracer_provider=trace.NoOpTracerProvider() ) client = self.create_client(transport) mock_span.is_recording.return_value = False @@ -454,7 +454,7 @@ class BaseTestCases: def test_not_recording(self): with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span: HTTPXClientInstrumentor().instrument( - tracer_provider=trace._DefaultTracerProvider() + tracer_provider=trace.NoOpTracerProvider() ) client = self.create_client() diff --git a/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py index 878cc7431..1375333b6 100644 --- a/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py +++ b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py @@ -250,7 +250,7 @@ class RequestsIntegrationTestBase(abc.ABC): with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span: RequestsInstrumentor().uninstrument() RequestsInstrumentor().instrument( - tracer_provider=trace._DefaultTracerProvider() + tracer_provider=trace.NoOpTracerProvider() ) mock_span.is_recording.return_value = False result = self.perform_request(self.URL) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py index 56b5068f2..405ff43c1 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py @@ -192,7 +192,7 @@ class RequestsIntegrationTestBase(abc.ABC): with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span: URLLibInstrumentor().uninstrument() URLLibInstrumentor().instrument( - tracer_provider=trace._DefaultTracerProvider() + tracer_provider=trace.NoOpTracerProvider() ) mock_span.is_recording.return_value = False result = self.perform_request(self.URL)