From 6e4f382cb61b9d9b0adfdd6edf6e2d75d5884eb4 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Fri, 23 Jun 2023 16:29:25 -0700 Subject: [PATCH 01/11] sqlalchemy wrap_create_engine accepts sqlcommenter options --- .../opentelemetry/instrumentation/sqlalchemy/__init__.py | 7 ++++--- .../opentelemetry/instrumentation/sqlalchemy/engine.py | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py index 77db23b417..2980b7b4e0 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py @@ -151,16 +151,17 @@ def _instrument(self, **kwargs): ) enable_commenter = kwargs.get("enable_commenter", False) + commenter_options = kwargs.get("commenter_options", {}) _w( "sqlalchemy", "create_engine", - _wrap_create_engine(tracer, connections_usage, enable_commenter), + _wrap_create_engine(tracer, connections_usage, enable_commenter, commenter_options), ) _w( "sqlalchemy.engine", "create_engine", - _wrap_create_engine(tracer, connections_usage, enable_commenter), + _wrap_create_engine(tracer, connections_usage, enable_commenter, commenter_options), ) _w( "sqlalchemy.engine.base", @@ -172,7 +173,7 @@ def _instrument(self, **kwargs): "sqlalchemy.ext.asyncio", "create_async_engine", _wrap_create_async_engine( - tracer, connections_usage, enable_commenter + tracer, connections_usage, enable_commenter, commenter_options ), ) if kwargs.get("engine") is not None: diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py index 9ff6057728..35771800bc 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py @@ -42,7 +42,7 @@ def _normalize_vendor(vendor): def _wrap_create_async_engine( - tracer, connections_usage, enable_commenter=False + tracer, connections_usage, enable_commenter=False, commenter_options={} ): # pylint: disable=unused-argument def _wrap_create_async_engine_internal(func, module, args, kwargs): @@ -51,20 +51,20 @@ def _wrap_create_async_engine_internal(func, module, args, kwargs): """ engine = func(*args, **kwargs) EngineTracer( - tracer, engine.sync_engine, connections_usage, enable_commenter + tracer, engine.sync_engine, connections_usage, enable_commenter, commenter_options ) return engine return _wrap_create_async_engine_internal -def _wrap_create_engine(tracer, connections_usage, enable_commenter=False): +def _wrap_create_engine(tracer, connections_usage, enable_commenter=False, commenter_options={}): def _wrap_create_engine_internal(func, _module, args, kwargs): """Trace the SQLAlchemy engine, creating an `EngineTracer` object that will listen to SQLAlchemy events. """ engine = func(*args, **kwargs) - EngineTracer(tracer, engine, connections_usage, enable_commenter) + EngineTracer(tracer, engine, connections_usage, enable_commenter, commenter_options) return engine return _wrap_create_engine_internal From 72477deac1ec2c1ce88b8e868764c658f262858e Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Fri, 23 Jun 2023 16:58:21 -0700 Subject: [PATCH 02/11] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aeb2e2cd4..565c6d2e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update falcon instrumentation to follow semantic conventions ([#1824](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1824)) +- Fix sqlalchemy instrumentation wrap methods to accept sqlcommenter options([#1873](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1873)) ### Added From de1b08126fccb6f02fd52f123c91b5b6a304e59f Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 10:07:30 -0700 Subject: [PATCH 03/11] Lint --- .../instrumentation/sqlalchemy/__init__.py | 13 ++++++++++--- .../instrumentation/sqlalchemy/engine.py | 18 +++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py index 2980b7b4e0..9a3c194ca0 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py @@ -156,12 +156,16 @@ def _instrument(self, **kwargs): _w( "sqlalchemy", "create_engine", - _wrap_create_engine(tracer, connections_usage, enable_commenter, commenter_options), + _wrap_create_engine( + tracer, connections_usage, enable_commenter, commenter_options + ), ) _w( "sqlalchemy.engine", "create_engine", - _wrap_create_engine(tracer, connections_usage, enable_commenter, commenter_options), + _wrap_create_engine( + tracer, connections_usage, enable_commenter, commenter_options + ), ) _w( "sqlalchemy.engine.base", @@ -173,7 +177,10 @@ def _instrument(self, **kwargs): "sqlalchemy.ext.asyncio", "create_async_engine", _wrap_create_async_engine( - tracer, connections_usage, enable_commenter, commenter_options + tracer, + connections_usage, + enable_commenter, + commenter_options, ), ) if kwargs.get("engine") is not None: diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py index 35771800bc..902652cf3d 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py @@ -51,20 +51,32 @@ def _wrap_create_async_engine_internal(func, module, args, kwargs): """ engine = func(*args, **kwargs) EngineTracer( - tracer, engine.sync_engine, connections_usage, enable_commenter, commenter_options + tracer, + engine.sync_engine, + connections_usage, + enable_commenter, + commenter_options, ) return engine return _wrap_create_async_engine_internal -def _wrap_create_engine(tracer, connections_usage, enable_commenter=False, commenter_options={}): +def _wrap_create_engine( + tracer, connections_usage, enable_commenter=False, commenter_options={} +): def _wrap_create_engine_internal(func, _module, args, kwargs): """Trace the SQLAlchemy engine, creating an `EngineTracer` object that will listen to SQLAlchemy events. """ engine = func(*args, **kwargs) - EngineTracer(tracer, engine, connections_usage, enable_commenter, commenter_options) + EngineTracer( + tracer, + engine, + connections_usage, + enable_commenter, + commenter_options, + ) return engine return _wrap_create_engine_internal From ae1dab3d0a600f5ebc5de5835365b81c4e1ae34c Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 10:38:03 -0700 Subject: [PATCH 04/11] Fix default val --- .../src/opentelemetry/instrumentation/sqlalchemy/engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py index 902652cf3d..5e2f471afb 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/engine.py @@ -42,7 +42,7 @@ def _normalize_vendor(vendor): def _wrap_create_async_engine( - tracer, connections_usage, enable_commenter=False, commenter_options={} + tracer, connections_usage, enable_commenter=False, commenter_options=None ): # pylint: disable=unused-argument def _wrap_create_async_engine_internal(func, module, args, kwargs): @@ -63,7 +63,7 @@ def _wrap_create_async_engine_internal(func, module, args, kwargs): def _wrap_create_engine( - tracer, connections_usage, enable_commenter=False, commenter_options={} + tracer, connections_usage, enable_commenter=False, commenter_options=None ): def _wrap_create_engine_internal(func, _module, args, kwargs): """Trace the SQLAlchemy engine, creating an `EngineTracer` From 9222d7fdf8bb4786ec2bf69b570d913538cbfb21 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 12:20:31 -0700 Subject: [PATCH 05/11] Add sqlalchemy tests --- .../tests/test_sqlalchemy.py | 95 +++++++++++++++++++ .../tests/test_sqlcommenter.py | 18 ++++ 2 files changed, 113 insertions(+) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index 981da107db..a8aedfa577 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import asyncio +import logging from unittest import mock import pytest @@ -176,6 +177,43 @@ def test_create_engine_wrapper(self): "opentelemetry.instrumentation.sqlalchemy", ) + def test_create_engine_wrapper_enable_commenter(self): + logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO) + SQLAlchemyInstrumentor().instrument( + enable_commenter=True, + commenter_options={"db_framework": False}, + ) + from sqlalchemy import create_engine # pylint: disable-all + + engine = create_engine("sqlite:///:memory:") + cnx = engine.connect() + cnx.execute("SELECT 1;").fetchall() + # sqlcommenter + self.assertRegex( + self.caplog.records[-2].getMessage(), + r"SELECT 1 /\*db_driver='(.*)',traceparent='\d{1,2}-[a-zA-Z0-9_]{32}-[a-zA-Z0-9_]{16}-\d{1,2}'\*/;", + ) + + def test_create_engine_wrapper_enable_commenter_otel_values_false(self): + logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO) + SQLAlchemyInstrumentor().instrument( + enable_commenter=True, + commenter_options={ + "db_framework": False, + "opentelemetry_values": False + }, + ) + from sqlalchemy import create_engine # pylint: disable-all + + engine = create_engine("sqlite:///:memory:") + cnx = engine.connect() + cnx.execute("SELECT 1;").fetchall() + # sqlcommenter + self.assertRegex( + self.caplog.records[-2].getMessage(), + r"SELECT 1 /\*db_driver='(.*)'\*/;", + ) + def test_custom_tracer_provider(self): provider = TracerProvider( resource=Resource.create( @@ -242,6 +280,63 @@ async def run(): asyncio.get_event_loop().run_until_complete(run()) + @pytest.mark.skipif( + not sqlalchemy.__version__.startswith("1.4"), + reason="only run async tests for 1.4", + ) + def test_create_async_engine_wrapper_enable_commenter(self): + async def run(): + logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO) + SQLAlchemyInstrumentor().instrument( + enable_commenter=True, + commenter_options={ + "db_framework": False, + }, + ) + from sqlalchemy.ext.asyncio import ( # pylint: disable-all + create_async_engine, + ) + + engine = create_async_engine("sqlite+aiosqlite:///:memory:") + async with engine.connect() as cnx: + await cnx.execute(sqlalchemy.text("SELECT 1;")) + # sqlcommenter + self.assertRegex( + self.caplog.records[1].getMessage(), + r"SELECT 1 /\*db_driver='(.*)',traceparent='\d{1,2}-[a-zA-Z0-9_]{32}-[a-zA-Z0-9_]{16}-\d{1,2}'\*/;", + ) + + asyncio.get_event_loop().run_until_complete(run()) + + @pytest.mark.skipif( + not sqlalchemy.__version__.startswith("1.4"), + reason="only run async tests for 1.4", + ) + def test_create_async_engine_wrapper_enable_commenter_otel_values_false(self): + async def run(): + logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO) + SQLAlchemyInstrumentor().instrument( + enable_commenter=True, + commenter_options={ + "db_framework": False, + "opentelemetry_values": False + }, + ) + from sqlalchemy.ext.asyncio import ( # pylint: disable-all + create_async_engine, + ) + + engine = create_async_engine("sqlite+aiosqlite:///:memory:") + async with engine.connect() as cnx: + await cnx.execute(sqlalchemy.text("SELECT 1;")) + # sqlcommenter + self.assertRegex( + self.caplog.records[1].getMessage(), + r"SELECT 1 /\*db_driver='(.*)'\*/;", + ) + + asyncio.get_event_loop().run_until_complete(run()) + def test_uninstrument(self): engine = create_engine("sqlite:///:memory:") SQLAlchemyInstrumentor().instrument( diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py index 5f9e75a1aa..241fd973a6 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py @@ -56,6 +56,24 @@ def test_sqlcommenter_enabled(self): r"SELECT 1 /\*db_driver='(.*)',traceparent='\d{1,2}-[a-zA-Z0-9_]{32}-[a-zA-Z0-9_]{16}-\d{1,2}'\*/;", ) + def test_sqlcommenter_enabled_otel_values_false(self): + engine = create_engine("sqlite:///:memory:") + SQLAlchemyInstrumentor().instrument( + engine=engine, + tracer_provider=self.tracer_provider, + enable_commenter=True, + commenter_options={ + "db_framework": False, + "opentelemetry_values": False + }, + ) + cnx = engine.connect() + cnx.execute("SELECT 1;").fetchall() + self.assertRegex( + self.caplog.records[-2].getMessage(), + r"SELECT 1 /\*db_driver='(.*)'\*/;", + ) + def test_sqlcommenter_flask_integration(self): engine = create_engine("sqlite:///:memory:") SQLAlchemyInstrumentor().instrument( From 4fa0f26fcf826e4b41129cb7a444fa6a6029b55c Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 12:23:20 -0700 Subject: [PATCH 06/11] Change a default in _instrument get --- .../src/opentelemetry/instrumentation/sqlalchemy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py index 9a3c194ca0..7d2f7e138b 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py @@ -151,7 +151,7 @@ def _instrument(self, **kwargs): ) enable_commenter = kwargs.get("enable_commenter", False) - commenter_options = kwargs.get("commenter_options", {}) + commenter_options = kwargs.get("commenter_options") _w( "sqlalchemy", From 7549f87ce141064e1ee9cdac8da1e5a7a1cbeb5a Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 12:44:07 -0700 Subject: [PATCH 07/11] Lint --- .../tests/test_sqlalchemy.py | 4 ++-- .../tests/test_sqlcommenter.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index a8aedfa577..cc5aa4c4ef 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -200,7 +200,7 @@ def test_create_engine_wrapper_enable_commenter_otel_values_false(self): enable_commenter=True, commenter_options={ "db_framework": False, - "opentelemetry_values": False + "opentelemetry_values": False, }, ) from sqlalchemy import create_engine # pylint: disable-all @@ -319,7 +319,7 @@ async def run(): enable_commenter=True, commenter_options={ "db_framework": False, - "opentelemetry_values": False + "opentelemetry_values": False, }, ) from sqlalchemy.ext.asyncio import ( # pylint: disable-all diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py index 241fd973a6..f13c552bf4 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlcommenter.py @@ -64,7 +64,7 @@ def test_sqlcommenter_enabled_otel_values_false(self): enable_commenter=True, commenter_options={ "db_framework": False, - "opentelemetry_values": False + "opentelemetry_values": False, }, ) cnx = engine.connect() From f1da587c3c6895eb51ad7ec6f656cdb6549ca8e9 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 14:08:48 -0700 Subject: [PATCH 08/11] More lint --- .../tests/test_sqlalchemy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index cc5aa4c4ef..813ac91a9a 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -312,7 +312,9 @@ async def run(): not sqlalchemy.__version__.startswith("1.4"), reason="only run async tests for 1.4", ) - def test_create_async_engine_wrapper_enable_commenter_otel_values_false(self): + def test_create_async_engine_wrapper_enable_commenter_otel_values_false( + self + ): async def run(): logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO) SQLAlchemyInstrumentor().instrument( From d5ecec5dba74b0d765a204e0fd43a87e6fb57b86 Mon Sep 17 00:00:00 2001 From: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com> Date: Mon, 26 Jun 2023 14:09:40 -0700 Subject: [PATCH 09/11] Update default Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/sqlalchemy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py index 7d2f7e138b..9a3c194ca0 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py @@ -151,7 +151,7 @@ def _instrument(self, **kwargs): ) enable_commenter = kwargs.get("enable_commenter", False) - commenter_options = kwargs.get("commenter_options") + commenter_options = kwargs.get("commenter_options", {}) _w( "sqlalchemy", From d26780b26d6504edb90faa7180244859e758f1f2 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 14:14:54 -0700 Subject: [PATCH 10/11] Update args doc --- .../src/opentelemetry/instrumentation/sqlalchemy/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py index 9a3c194ca0..84eeb59541 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py @@ -134,6 +134,9 @@ def _instrument(self, **kwargs): ``engine``: a SQLAlchemy engine instance ``engines``: a list of SQLAlchemy engine instances ``tracer_provider``: a TracerProvider, defaults to global + ``meter_provider``: a MeterProvider, defaults to global + ``enable_commenter``: bool to enable sqlcommenter, defaults to False + ``commenter_options``: dict of sqlcommenter config, defaults to None Returns: An instrumented engine if passed in as an argument or list of instrumented engines, None otherwise. From 5296711a745bd849ff28a5657e29b902fbf76404 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Mon, 26 Jun 2023 14:32:50 -0700 Subject: [PATCH 11/11] lintttt --- .../tests/test_sqlalchemy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py index 813ac91a9a..d15689ca33 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py @@ -313,7 +313,7 @@ async def run(): reason="only run async tests for 1.4", ) def test_create_async_engine_wrapper_enable_commenter_otel_values_false( - self + self, ): async def run(): logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO)