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

Respect provided tracer provider when instrumenting SQLAlchemy #728

Merged

Conversation

jfmyers9
Copy link
Contributor

@jfmyers9 jfmyers9 commented Oct 12, 2021

Description

This change updates the SQLALchemyInstrumentor to respect the tracer provider that is passed in through the kwargs when patching the create_engine functionality provided by SQLAlchemy. Previously, it would default to the global tracer provider.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Unit tested and tested in a real environment.

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

@jfmyers9 jfmyers9 requested a review from a team October 12, 2021 15:17
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 12, 2021

CLA Signed

The committers are authorized under a signed CLA.

@owais
Copy link
Contributor

owais commented Oct 12, 2021

@jfmyers9 thanks for fixing this. Please sign the CLA as described here: #728 (comment)

@owais
Copy link
Contributor

owais commented Oct 12, 2021

@jfmyers9 thanks. please also add a changelog entry

@jfmyers9 jfmyers9 force-pushed the respect-tracer-provider-sqlalchemy branch from f55d582 to bc02c59 Compare October 12, 2021 16:00
@owais owais enabled auto-merge (squash) October 12, 2021 16:04
@jfmyers9
Copy link
Contributor Author

Working on getting the CLA signed. Will get back to you when I figure that out.

This change updates the SQLALchemyInstrumentor to respect the tracer
provider that is passed in through the kwargs when patching the
`create_engine` functionality provided by SQLAlchemy. Previously, it
would default to the global tracer provider.
auto-merge was automatically disabled October 12, 2021 16:08

Head branch was pushed to by a user without write access

@jfmyers9 jfmyers9 force-pushed the respect-tracer-provider-sqlalchemy branch from bc02c59 to cd32211 Compare October 12, 2021 16:08
@owais owais enabled auto-merge (squash) October 12, 2021 16:09
auto-merge was automatically disabled October 12, 2021 16:32

Head branch was pushed to by a user without write access

@jfmyers9
Copy link
Contributor Author

@owais Is tox -e lint the correct way to run linting? I fixed all of the issues reported related to this changeset, but it seems to complain on isort for things that are seemingly unrelated.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

👍

@owais owais enabled auto-merge (squash) October 12, 2021 17:26
@owais owais merged commit e8af7a3 into open-telemetry:main Oct 12, 2021
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.

4 participants