Psycopg2Instrumentor().instrument_connection
raises AttributeError: 'psycopg2.extensions.connection' object has no attribute '_is_instrumented_by_opentelemetry'
#2522
Labels
bug
Something isn't working
Describe your environment
Steps to reproduce
Use
Psycopg2Instrumentor().instrument_connection
. For example:and run a database with:
What is the actual behavior?
Additional context
Here's where the error happens:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/__init__.py
Line 164 in 46d2ce6
The code seems tested here:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py
Line 210 in 46d2ce6
but it doesn't get the error because it's a mock connection.
The text was updated successfully, but these errors were encountered: