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

Support the custom libssl in psycopg2 #1606

Open
grcevski opened this issue Feb 4, 2025 · 1 comment
Open

Support the custom libssl in psycopg2 #1606

grcevski opened this issue Feb 4, 2025 · 1 comment
Assignees

Comments

@grcevski
Copy link
Contributor

grcevski commented Feb 4, 2025

A very commonly used Python library for Posgres is bundling their own libssl https://www.psycopg.org/docs/install.html. We should look harder for the libssl symbols to add our UProbes.

@grcevski grcevski self-assigned this Feb 5, 2025
@grcevski
Copy link
Contributor Author

grcevski commented Feb 7, 2025

After some initial investigation it seems that the recommended approach for psycopg2 is to use the no-binary distribution (which bundles their older version of libssl 1.1). https://www.psycopg.org/docs/install.html

The psycopg vs psycopg-binary section says:

The psycopg2-binary package is meant for beginners to start playing with Python and PostgreSQL without the need to meet the build requirements.

If you are the maintainer of a published package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

I tested our examples code with Potgresql with SSL mode and with installing psycopg2 from source, e.g. pip install psycopg2 and it picks up my local libssl3 and Beyla is able to correlate the events.

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

No branches or pull requests

1 participant