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

DB drivers: db.statement inclusion of sqlcomment as opt-in #3121

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tammy-baylis-swi
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi commented Dec 19, 2024

Description

Supports new, optional kwarg enable_attribute_commenter to opt into db.statement span attribute inclusion of sqlcomment for these db driver instrumentors:

  • psycopg2 instrumentor
  • psycopg instrumentor
  • mysqlclient instrumentor
  • PyMySQL instrumentor

Partially addresses #3107

Depends on approval and merge of #3115. Please make sure that's merged first.

Type of change

Breaking because db.statement span attribute inclusion of sqlcomment currently always happens if sqlcommenter enabled. It'll be opt-in with this update, so might break for those users relying on the feature introduced in 0.50b0.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • tox -e py312-test-instrumentation-psycopg2
  • tox -e py312-test-instrumentation-psycopg
  • tox -e py312-test-instrumentation-mysqlclient
  • tox -e py312-test-instrumentation-pymysq;

Does This PR Require a Core Repo Change?

  • No.

Checklist:

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

@tammy-baylis-swi tammy-baylis-swi marked this pull request as ready for review December 23, 2024 17:32
@tammy-baylis-swi tammy-baylis-swi requested a review from a team as a code owner December 23, 2024 17:32
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