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

Improve documentation of instrumentation's sqlcommenter feature #3162

Open
tammy-baylis-swi opened this issue Jan 2, 2025 · 0 comments
Open

Comments

@tammy-baylis-swi
Copy link
Contributor

tammy-baylis-swi commented Jan 2, 2025

What problem do you want to solve?

sqlcommenter / sqlcommenting is a feature that some of the Python database client instrumentors have supported for some years now, at different levels and through a variety of implementations:

  1. psycopg2
  2. psycopg
  3. mysqlclient/MySQLdb
  4. PyMySQL
  5. SQLAlchemy
  6. Django ORM
  7. Flask

For 1-4, the implementation is inherited through the DB-API instrumentor.

From the above docs, it might not be immediately clear to users what this feature does and when to use it. It may also be difficult for contributing developers to onboard.

Describe the solution you'd like

Update the documentation of Python database client instrumentors that support sqlcommenter. Potentially update in-code comments to point developers at key parts of implementation e.g. the inherited DB-API functions.

Describe alternatives you've considered

sqlcomment is not currently in the Otel semconv (database spec). I suggest a separate issue for TC proposal using these Python instrumentors as prototype/proof-of-concept.

Additional Context

Google's doc on sqlcommenter is helpful: https://google.github.io/sqlcommenter/

Would you like to implement a fix?

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant