Open bllchmbrs opened 1 month ago
Thanks for the report. I had tested psycopg2, and pyscopg v3 connections, but not psycopg2 connections :facepalm:
I've reported the underlying issue here: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2522
I'm surprised no one else has reported it before!
Me too, now that you mention what it is!
Guess it's not a blocker because I can work around, but interesting to see I'm the one that hit it!
Description
I found these docs.
When I instrument my connection like this:
logfire.instrument_psycopg(connection)
I get an error: `AttributeError: 'psycopg2.extensions.connection' object has no attribute '_is_instrumented_by_opentelemetry'However, if I run
logfire.instrument_psycopg()
it works fine.I found this strange because the docs suggested I could instrument a specific connection like this:
This is either a bug or user error, I am not sure how it could be user error though because the connection has worked fine for many months.
Python, Logfire & OS Versions, related packages (not required)
No response