opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

bug_fix(1477): type handling in _add_sql_comment

Open aryabharat opened this issue 11 months ago • 7 comments
trafficstars

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.

  • [X] Bug fix (non-breaking change which fixes an issue)

aryabharat avatar Dec 17 '24 17:12 aryabharat

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: aryabharat / name: Bharat Arya (ba3b51ae40c97c2e53fec99fac809602b6b4f8ac, a18df5ec05180f068f32f8b26eed3f368f605b2c, 03561c80fc291d97833dcf55d0cb4d13f11010cb, b75a9773281aaab57021e101b02d1dea4fba71a3, 2c8d0084a85f66ed11251fb5bd7d145c9d89d788, 226c8e6a1bbe1ba7b88e9b1856f3178407629fff, e90eefe893b5116fc0015f0454d0c53df63cc8af, cc7332d1e3a309880d8bc8a3986f3f7d39e00e52, 113222a58021a262f404e16236dd1cf1abb7ed53, 1d45193da52a83f95f7e4653b4978d0535d798f9, 14d0200dc0cce6941f0836cc61dd25fc6694a649, ce7f69a38180893a6c4f325caadc720f98896a71, 7aed1af9cbd8bb47ee56ab159aeff99ed1acaa2f, 79321ed195715351fb613d7fb2f5d791ad208c9b, 7b4e3cbcc6c5170de84bba9c2a323583edfb7ffe, 341899ddb19de527a441b2afb4ec4161eb550371, 1060c80dc30b171ce104bb9d246e8915579ae7b0, 592903c85fe0e703c688c8fdd9c71465992b93ea, e6c47acabb624c955c50bad13079b29ad59aa86e, 44d9f8d718902a12ce0d692b7e6ecb5eb4806ccc, b35a8cbeb190751887e46a0afba9ba0e0cd58901, 0e1c38f7d7a7cdeaab81bb3301e6c8202c3be305, 11653c7508b8711ca66c1f99367ded278c811049, 3e80a2de5a186b484a3c3d89c6bcf2cf4dfd1d83)
  • :white_check_mark: login: lzchen / name: Leighton Chen (a2025502039fec5549a31dc774f0d652a7c9e81d)
  • :white_check_mark: login: tammy-baylis-swi / name: Tammy Baylis (43750c044db82dcd8012d963e907dbf5b5fca4d9)
  • :white_check_mark: login: xrmx / name: Riccardo Magliocchetti (b1e84d91f91806144184cc814dfa22e89fe336c7)

Thanks @aryabharat . Please could you update CHANGELOG.md with this PR?

tammy-baylis-swi avatar Feb 18 '25 17:02 tammy-baylis-swi

Thanks @aryabharat . Please could you update CHANGELOG.md with this PR?

Done

aryabharat avatar Feb 19 '25 15:02 aryabharat

@tammy-baylis-swi Please let me what all changes are required.

aryabharat avatar Feb 25 '25 18:02 aryabharat

@Kludex Please can you review?

aryabharat avatar Mar 03 '25 16:03 aryabharat

@xrmx @tammy-baylis-swi can we merge this?

aryabharat avatar Mar 10 '25 14:03 aryabharat

Hi @Kludex can we merge this?

aryabharat avatar Mar 19 '25 08:03 aryabharat

Please stop pinging me.

I do not have bandwidth to review this again. I've shared my concerns already.

Kludex avatar Mar 26 '25 06:03 Kludex

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.

aryabharat avatar Mar 26 '25 07:03 aryabharat

@xrmx Please have a look, if this is not accepted then we can close this PR. Thanks.

aryabharat avatar Mar 26 '25 08:03 aryabharat

@aryabharat Please stop pinging people, this will be merged eventually.

xrmx avatar Mar 26 '25 17:03 xrmx