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

DBAPI: Add param to control capturing of db.statement.parameters #156

Merged
merged 7 commits into from
Nov 10, 2020

Conversation

stschenk
Copy link
Contributor

@stschenk stschenk commented Nov 6, 2020

Description

Switched DBAPI so that it will not capture parameterized query parameters. Capturing this would be a problem in production environments since they will contain sensitive information such as session tokens and hashed passwords.

Have added a parameter to the instrumentation constructor to allow for this feature to be turned on.

I will mark this as a breaking change since I am removing the db.statement.parameter span attribute and something might be depending on it.

Fixes #157

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

  • Unit Tests

Checklist:

  • [ x] Followed the style guidelines of this project
  • [ x] Changelogs have been updated
  • [ x] Unit tests have been added
  • Documentation has been updated

@stschenk stschenk requested review from a team, codeboten and toumorokoshi and removed request for a team November 6, 2020 17:40
Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

A couple small changes, but LGTM!

@@ -16,7 +19,7 @@ Released 2020-09-17
Released 2020-08-14

- Change package name to opentelemetry-instrumentation-dbapi
([#966](https://github.com/open-telemetry/opentelemetry-python/pull/966))
([#156](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/156))
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't think we need this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ugh... not sure what I was thinking. Will fix this.

@lzchen lzchen merged commit b9a42e2 into open-telemetry:master Nov 10, 2020
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.

Ability to disable opentelemetry-instrumentation-dbapi sql parameter capture
3 participants