opentelemetry-python-contrib
opentelemetry-python-contrib copied to clipboard
psycopg: Patch server_cursor_factory
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