-
Notifications
You must be signed in to change notification settings - Fork 641
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-binary support #3186
base: main
Are you sure you want to change the base?
psycopg2-binary support #3186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kafka-python instrumentation had to handle it in a bit more complicated way in KafkaInstrumentor.instrumentation_dependencies. Why a similar change is not required here?
@xrmx good catch! This has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think would be nice to have this tested at CI, like adding psycopg2-binary package installed in a test-requirements.txt file in the same way was done for kafka-python
@@ -34,6 +34,7 @@ dependencies = [ | |||
[project.optional-dependencies] | |||
instruments = [ | |||
"psycopg2 >= 2.7.3.1", | |||
"psycopg2-binary >= 2.7.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what we want tho?
Using pip install opentelemetry-instrumentation-psycopg2[instruments]
would install both psycopg2-binary
and psycopg2
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are abusing optional dependencies to do discovery of things, I hope the opentelementry-instrumentation-x[instruments]
is not documented anywhere.
@emdneto Good idea. I've added the config to this PR. |
@joshowen please regenerate the workflows |
Fixes #610
Inspired by #1422
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.