Extending SQLCommenter support of dbapi into psycopg2#940
Merged
ocelotl merged 23 commits intoopen-telemetry:mainfrom Mar 18, 2022
Merged
Extending SQLCommenter support of dbapi into psycopg2#940ocelotl merged 23 commits intoopen-telemetry:mainfrom
ocelotl merged 23 commits intoopen-telemetry:mainfrom
Conversation
…n-v2' into sqlcommenter-psycopg2-integration-v2
srikanthccv
reviewed
Mar 4, 2022
Member
srikanthccv
left a comment
There was a problem hiding this comment.
@Thiyagu55 Can you add a test for this
Contributor
Author
|
Contributor
A test case for this change can be very simple, making sure the default value is |
Member
|
And you can add some integration tests here enabling this feature. |
…n-v2' into sqlcommenter-psycopg2-integration-v2
…n-v2' into sqlcommenter-psycopg2-integration-v2
Contributor
Author
@srikanthccv @ocelotl Unit tests and integration tests have been added and PR description is updated |
Member
|
@Thiyagu55 Please fix the failing tests |
bad6b36 to
36737e4
Compare
srikanthccv
approved these changes
Mar 17, 2022
This file contains hidden or 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
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
This PR integrates SQLCommenter into Psycopg2. When SQLCommenter is enabled in the library the SQL query logs will have traceparent id appended.
It's enabled using flag enable_commenter
Psycopg2Instrumentor()._instrument(tracer_provider=provider, enable_commenter=True)Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.