-
Notifications
You must be signed in to change notification settings - Fork 674
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
bug_fix(1477): type handling in _add_sql_comment #3113
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.
Thanks for the PR, could you please add a test so we are sure that the code is fixing the reported issue?
opentelemetry-instrumentation/src/opentelemetry/instrumentation/sqlcommenter_utils.py
Outdated
Show resolved
Hide resolved
5cb5d9d
to
577f808
Compare
5e98fce
to
cc7332d
Compare
@tammy-baylis-swi Please let me what all changes are required. |
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.
Thanks again! Lgtm
@Kludex Please can you review? |
@xrmx @tammy-baylis-swi can we merge this? |
Hi @Kludex can we merge this? |
...tion/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py
Show resolved
Hide resolved
Please stop pinging me. I do not have bandwidth to review this again. I've shared my concerns already. |
I have replied to your comment. |
@xrmx Please have a look, if this is not accepted then we can close this PR. |
@aryabharat Please stop pinging people, this will be merged eventually. |
Description
This PR fixes an issue with SQL comment generation, the current implementation fails when processing non-string SQL queries, particularly those from psycopg2's SQL utilities.
Modified _add_sql_comment() function to handles different SQL query types by converting incoming sql queries to strings
Preserves the original query if comment generation fails
Fixes #1477
Type of change
Please delete options that are not relevant.