From e3d7941bfaa8cad7c9e5bcec13c681c84bc49e60 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Tue, 10 Dec 2024 16:28:36 -0800 Subject: [PATCH] Consistent pg_connection alias usage --- .../src/opentelemetry/instrumentation/psycopg/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/__init__.py b/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/__init__.py index ad8632b88a..984decd986 100644 --- a/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/__init__.py @@ -162,7 +162,7 @@ def _instrument(self, **kwargs): dbapi.wrap_connect( __name__, - psycopg.Connection, # pylint: disable=no-member + pg_connection, # pylint: disable=no-member "connect", self._DATABASE_SYSTEM, self._CONNECTION_ATTRIBUTES, @@ -189,7 +189,7 @@ def _uninstrument(self, **kwargs): """ "Disable Psycopg instrumentation""" dbapi.unwrap_connect(psycopg, "connect") # pylint: disable=no-member dbapi.unwrap_connect( - psycopg.Connection, + pg_connection, "connect", # pylint: disable=no-member ) dbapi.unwrap_connect(