Skip to content
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

(instrumentation-sqlite3): trace connections made with dbapi2.connect #873

Merged
merged 6 commits into from
Jan 26, 2022

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Jan 25, 2022

Description

Django basic app auto instrumentation with sqlite3 as a backend didn't produce the db spans. Digging further I realised it uses the dbapi2.connect (which is same as sqlite3.connect) for historical reasons. This updates to instrument both.

Type of change

Please delete options that are not relevant.

  • 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

  • tox -e test-instruementation-sqlite3

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

@srikanthccv srikanthccv changed the title Change wrap_connect method for sqlite3 (instrumentation-sqlite3): trace connections made with dbapi2.connect Jan 25, 2022
@srikanthccv srikanthccv marked this pull request as ready for review January 25, 2022 22:15
@srikanthccv srikanthccv requested a review from a team January 25, 2022 22:15
@ocelotl ocelotl enabled auto-merge (squash) January 26, 2022 00:15
@ocelotl ocelotl merged commit 571c378 into open-telemetry:main Jan 26, 2022
@srikanthccv srikanthccv deleted the sqlite-connect branch January 26, 2022 00:54
sanketmehta28 pushed a commit to sanketmehta28/opentelemetry-python-contrib that referenced this pull request Jan 26, 2022
…t` (open-telemetry#873)

* Change wrap_connect method

* Wrap both connect defs

* Add tests

* Add CHANGELOG entry
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.

2 participants