Skip to content

Conversation

@florianschieder
Copy link

Description

This pull request implements forwarding "all" keyword arguments to wrap_connect(), our concrete use case is the one as described in #2894. Defaults are kept as defined previously.

Fixes #2894 (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • added new unittests which first failed, ran them with tox -e test-instrumentation-mysqlclient
  • ran tox -e lint-instrumentation-mysqlclient
  • ran tox -e precommit

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

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
  • Documentation has been updated

@florianschieder florianschieder requested a review from a team as a code owner November 17, 2025 14:16
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: florianschieder / name: Florian Schieder (afdc78e)

…lemetry#2894)

- forward "all" keyword arguments to wrap_connect()
- keep defaults as defined previously
@florianschieder
Copy link
Author

Rebased onto upstream main. Feel free to have a final look at the changes.
Many thanks for the constructive exchange and review suggestions :-)

Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the constructive exchange and review suggestions :-)

Thanks for walking through things! Lgtm, the Maintainers will also have a look.

"enable_commenter": False,
"commenter_options": {},
"enable_attribute_commenter": False,
**kwargs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think on having an utility function that extracts from kwargs whatever wrap_connect supports instead? I think it'll become harder to reason about code that just forwards everything it gets.

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

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

MySQLClientInstrumentor: pass kwargs to wrap_connect

3 participants