-
Notifications
You must be signed in to change notification settings - Fork 636
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
Add docstring for instrument_connection() and tests for database drivers #3108
Add docstring for instrument_connection() and tests for database drivers #3108
Conversation
instrumentation/opentelemetry-instrumentation-sqlite3/tests/test_sqlite3.py
Outdated
Show resolved
Hide resolved
...tion/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/__init__.py
Outdated
Show resolved
Hide resolved
Thanks @beijiez ! I've requested one set of changes first. There are a few CI formatting checks failing. Here are some more individual local commands if you could please run on your local:
|
Thank you for the fast review @tammy-baylis-swi! Updated and re-ran CI locally
|
...tion/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/__init__.py
Outdated
Show resolved
Hide resolved
...emetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient/__init__.py
Outdated
Show resolved
Hide resolved
.../opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/__init__.py
Outdated
Show resolved
Hide resolved
.../opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py
Outdated
Show resolved
Hide resolved
.../opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py
Outdated
Show resolved
Hide resolved
...pentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/__init__.py
Outdated
Show resolved
Hide resolved
...emetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient/__init__.py
Outdated
Show resolved
Hide resolved
Thank you again @beijiez ! Nice to see all CI passing now. I've left more suggestions and a question when you have a moment. |
Thank you for the detailed review @tammy-baylis-swi ! I responded to your question, re-verified CI, and pushed changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the examples from the code-blocks don't run as they are written. Can we add the table creation before the insertion?
It saves time for those reading the docs when trying the code snippets.
@Kludex could you provide a |
Good callout, sqlite3 currently has a working example with table creation. Can add it to rest of the docstrings
|
Ah, I see. I was thinking docs/formatting tables instead of db tables. 😅 |
Yeah, I updated the sqlite3 one last week. 😁 That would be great. Thanks! |
Done. Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, thank you for all the work!
This will be checked by the Maintainers next.
Description
Add docstring for
instrument_connection()
and tests for database drivers as it is missing. This will be useful to new database instrumentation effortsDB driver docstrings updated:
[x] aiopg
[x] mysql-connector
[x] mysqlclient
[x] psycopg
[x] psycopg2
[x] pymysql
[x] sqlite3
Addresses #3089
How Has This Been Tested?
/tests
if it was missingtox -e spellcheck
OKtox
congratulations :)Does This PR Require a Core Repo Change?
No