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

SQLAlchemy: Use SQL operation and DB name as the Span name #254

Merged

Conversation

owais
Copy link
Contributor

@owais owais commented Dec 14, 2020

Description

Current instrumentation uses the entire SQL query as the operation name
which makes traces very hard to read and understand in addition to
introducing high-cardinality issues. This commit fixes the problem by
using only the SQL operation name and the DB name instead of the entire
query.

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?

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

  • Manual testing
  • Updated unit tests

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

@owais owais force-pushed the fix-sqlalchemy-operation-name branch 8 times, most recently from 1ec0595 to 28fd8d3 Compare December 14, 2020 15:57
@owais owais marked this pull request as ready for review December 14, 2020 16:52
@owais owais requested review from a team, aabmass and ocelotl and removed request for a team December 14, 2020 16:52
@lzchen
Copy link
Contributor

lzchen commented Dec 15, 2020

Part of #159

@owais owais force-pushed the fix-sqlalchemy-operation-name branch 5 times, most recently from 8b43444 to b71d93b Compare January 8, 2021 09:11
@owais
Copy link
Contributor Author

owais commented Jan 8, 2021

PTAL @aabmass @lzchen

@owais owais force-pushed the fix-sqlalchemy-operation-name branch 2 times, most recently from 75b995a to 2dfe7cc Compare January 11, 2021 14:53
@lzchen
Copy link
Contributor

lzchen commented Jan 19, 2021

@owais has @aabmass 's comments been addressed yet?

@owais owais force-pushed the fix-sqlalchemy-operation-name branch from 2dfe7cc to 2b9e435 Compare January 19, 2021 20:27
@owais
Copy link
Contributor Author

owais commented Jan 19, 2021

@lzchen Yes, they've been addressed. Not sure why github shows them as unresolved. May be a bad rebase. Will double check in the morning. Will also address @ocelotl comments in the morning.

@owais owais force-pushed the fix-sqlalchemy-operation-name branch from 2b9e435 to 928c7a2 Compare January 20, 2021 09:50
@owais owais mentioned this pull request Jan 20, 2021
12 tasks
Current instrumentation uses the entire SQL query as the operation name
which makes traces very hard to read and understand in addition to
introducing high-cardinality issues. This commit fixes the problem by
using only the SQL operation name and the DB name instead of the entire
query.
@owais owais force-pushed the fix-sqlalchemy-operation-name branch from 928c7a2 to d8cf958 Compare January 20, 2021 09:55
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.

👍

@codeboten codeboten merged commit 8c8f278 into open-telemetry:master Jan 20, 2021
@owais owais deleted the fix-sqlalchemy-operation-name branch January 20, 2021 17:25
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.

5 participants