From a94a59121d8af86c602fc26f7ce90a0bb1a1d4ab Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Tue, 10 Dec 2024 16:32:15 -0800 Subject: [PATCH] Revert "Consistent pg_connection alias usage" This reverts commit e3d7941bfaa8cad7c9e5bcec13c681c84bc49e60. --- .../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 984decd986..ad8632b88a 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__, - pg_connection, # pylint: disable=no-member + psycopg.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( - pg_connection, + psycopg.Connection, "connect", # pylint: disable=no-member ) dbapi.unwrap_connect(