From 43d0c6cae377b2c7bc230f431c347a73034b441a Mon Sep 17 00:00:00 2001 From: avzis <107620508+avzis@users.noreply.github.com> Date: Thu, 12 Jan 2023 19:16:03 +0200 Subject: [PATCH] fix the instantiation of NoOpTracerProvider (#1577) --- .../opentelemetry-instrumentation-redis/tests/test_redis.py | 2 +- .../tests/test_sqlalchemy.py | 2 +- .../tests/test_urllib_integration.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py b/instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py index 3abcb516ff..1ae1690efa 100644 --- a/instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py +++ b/instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py @@ -150,7 +150,7 @@ def request_hook(span, conn, args, kwargs): def test_no_op_tracer_provider(self): RedisInstrumentor().uninstrument() - tracer_provider = trace.NoOpTracerProvider + tracer_provider = trace.NoOpTracerProvider() RedisInstrumentor().instrument(tracer_provider=tracer_provider) redis_client = redis.Redis() diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index 7f0e655a9e..936bef4b49 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -258,7 +258,7 @@ def test_no_op_tracer_provider(self): engine = create_engine("sqlite:///:memory:") SQLAlchemyInstrumentor().instrument( engine=engine, - tracer_provider=trace.NoOpTracerProvider, + tracer_provider=trace.NoOpTracerProvider(), ) cnx = engine.connect() cnx.execute("SELECT 1 + 1;").fetchall() diff --git a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py index 5f1a5720bc..32c55688e9 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py @@ -351,7 +351,7 @@ def response_hook(span, request_obj, response): def test_no_op_tracer_provider(self): URLLibInstrumentor().uninstrument() - tracer_provider = trace.NoOpTracerProvider + tracer_provider = trace.NoOpTracerProvider() URLLibInstrumentor().instrument(tracer_provider=tracer_provider) result = self.perform_request(self.URL)