Skip to content

use sqlalchemy module name not engine. fixes #922#1086

Merged
srikanthccv merged 3 commits intoopen-telemetry:mainfrom
mjuarez:sqlalchemy-tracer-name
May 11, 2022
Merged

use sqlalchemy module name not engine. fixes #922#1086
srikanthccv merged 3 commits intoopen-telemetry:mainfrom
mjuarez:sqlalchemy-tracer-name

Conversation

@mjuarez
Copy link
Contributor

@mjuarez mjuarez commented May 10, 2022

Description

Bug fix for module name emitted by sqlalchemy.

Other instrumentation libraries appear to be calling get_tracer with __name__ but the API docs seems to recommend against this.

Fixes #922

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added test cases for instrumentation_scope.name

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 10, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@mjuarez mjuarez force-pushed the sqlalchemy-tracer-name branch from 08d3823 to 8c82330 Compare May 10, 2022 17:55
@mjuarez mjuarez marked this pull request as ready for review May 10, 2022 17:55
@mjuarez mjuarez requested a review from a team May 10, 2022 17:55
@srikanthccv
Copy link
Member

Other instrumentation libraries appear to be calling get_tracer with __name__ but the API docs seems to recommend against this.

Where it is used, it's just a single file and there is no difference b/w __name__ and having a const opentelemetry.instrumentation.x. And that might not be the case for some instrumentations so we added the explanation in the doc.

@srikanthccv srikanthccv merged commit 80969a0 into open-telemetry:main May 11, 2022
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.

SQLAlchemy instrumentation sets otel.library.name as the vendor, not the library name

2 participants