Skip to content

Fix pyodbc cursor error in SQLA instrumentation#469

Merged
codeboten merged 9 commits intoopen-telemetry:mainfrom
jomasti:sqlalchemy-pyodbc-cursor-error
Jun 7, 2021
Merged

Fix pyodbc cursor error in SQLA instrumentation#469
codeboten merged 9 commits intoopen-telemetry:mainfrom
jomasti:sqlalchemy-pyodbc-cursor-error

Conversation

@jomasti
Copy link
Contributor

@jomasti jomasti commented Apr 26, 2021

Description

Deleting the cursor reference after execution and in the error handler
instead of keeping a weak reference.

Fixes #460

Type of change

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

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

  • Added Docker tests for MSSQL and pyodbc to verify the instrumentation as
    working

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@jomasti jomasti marked this pull request as ready for review April 26, 2021 04:02
@jomasti jomasti requested review from a team, aabmass and hectorhdzg and removed request for a team April 26, 2021 04:02
ocelotl
ocelotl previously approved these changes May 27, 2021
@ocelotl ocelotl self-requested a review May 27, 2021 23:11
@ocelotl ocelotl dismissed their stale review May 27, 2021 23:12

Approved by mistake

@ocelotl
Copy link
Contributor

ocelotl commented May 27, 2021

Please take a look at the failing test case, @jomasti

jomasti and others added 5 commits June 1, 2021 15:06
Deleting the cursor reference after execution and in the error handler
instead of keeping a weak reference.

Added Docker tests for MSSQL and pyodbc to verify the instrumentation as
working
@jomasti jomasti changed the title Fix pyodbc cursor error in SQLA instumentation Fix pyodbc cursor error in SQLA instrumentation Jun 2, 2021
@codeboten codeboten merged commit b2dd4b8 into open-telemetry:main Jun 7, 2021
@jomasti jomasti deleted the sqlalchemy-pyodbc-cursor-error branch June 8, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlalchemy: TypeError: cannot create weak reference to 'pyodbc.Cursor' object

4 participants