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

psycopg: Patch server_cursor_factory

Open jamestjw opened this issue 10 months ago • 1 comments
trafficstars

Description

When getting a cursor with a name, the Connection class produces a cursor using server_cursor_factory. However, this factory isn't instrumented. This PR aims to remedy this issue.

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

I added unit tests that would fail without my changes.

Does This PR Require a Core Repo Change?

  • [ ] Yes. - Link to PR:
  • [X] No.

Checklist:

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

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

jamestjw avatar Jan 10 '25 22:01 jamestjw

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: jamestjw / name: James Tan (aa6e03ef9e16360f04087f00da556bbad654ce9b)