-
Notifications
You must be signed in to change notification settings - Fork 624
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 and dbapi instrumentaiton fixes #246
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
owais
force-pushed
the
dbapi-rework
branch
13 times, most recently
from
December 12, 2020 23:17
4c39049
to
d6a25cf
Compare
srikanthccv
reviewed
Dec 14, 2020
...tion/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py
Show resolved
Hide resolved
12 tasks
owais
force-pushed
the
dbapi-rework
branch
9 times, most recently
from
January 8, 2021 11:41
c3192d9
to
c305a8e
Compare
owais
changed the title
WIP: psycopg2 instrumentaiton fixes
psycopg2 instrumentaiton fixes
Jan 8, 2021
owais
changed the title
psycopg2 instrumentaiton fixes
psycopg2 and dbapi instrumentaiton fixes
Jan 8, 2021
owais
force-pushed
the
dbapi-rework
branch
4 times, most recently
from
January 12, 2021 18:03
5bf1d30
to
ced0e41
Compare
ocelotl
approved these changes
Jan 19, 2021
instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py
Show resolved
Hide resolved
owais
force-pushed
the
dbapi-rework
branch
3 times, most recently
from
January 19, 2021 20:24
6f924fe
to
a354266
Compare
aabmass
requested changes
Jan 19, 2021
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.
Jusit one blocking request
...tion/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py
Show resolved
Hide resolved
...tion/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py
Outdated
Show resolved
Hide resolved
...pentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/__init__.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-dbapi/tests/test_dbapi_integration.py
Show resolved
Hide resolved
...telemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py
Outdated
Show resolved
Hide resolved
srikanthccv
approved these changes
Jan 20, 2021
owais
force-pushed
the
dbapi-rework
branch
2 times, most recently
from
January 20, 2021 10:23
29b0612
to
d2295fb
Compare
Changes: - Update dbapi instrumentation to use the SQL statement name as the span instead of the entire SQL query. - Renamed TracedCursor with CursorTracing. The class was not a valid Cursor so the name was confusing. - Updated CursorTracing's (previously TracedCursor) traced_execution method to accept the cursor instance as the first argument. This is required as for some dbapi implementations, we need a reference to the cursor in order to correctly format the SQL query. - Updated psycopg2 instrumentation to leverage dbapi's `cursor_factory` mechanism instead of wrapping the cursor with wrapt. This results in a simpler instrumentation without monkey patching objects at runtime and allows psycopg2's type registration system to work. This should make it possible to use psycopg2 instrumentation when using the JSONB feature or with frameworks like Django.
@aabmass please take another look when you can. Thanks. |
aabmass
approved these changes
Jan 20, 2021
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.
🚢
codeboten
approved these changes
Jan 20, 2021
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #143
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist: