Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2/psycopg: Add instrument_connection check for if provided connection already instrumented #3138

Open
tammy-baylis-swi opened this issue Dec 21, 2024 · 0 comments

Comments

@tammy-baylis-swi
Copy link
Contributor

What problem do you want to solve?

In working on a fix for #2522, we decided to temporarily remove the check for if the psycopg2 connection provided to instrument_connection was already Otel-instrumented -- see PR comment. The logic originally introduced doesn't seem viable (AttributeError) but would still be good to have this feature.

Describe the solution you'd like

Add instrument_connection check for if provided connection already instrumented by psycopg2/psycopg Otel instrumentors. Don't instrument the connection again, and just return it.

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant