Skip to content

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

Merged
lzchen merged 7 commits intoopen-telemetry:masterfrom
stschenk:dbapi-skip-params-by-default
Nov 10, 2020
Merged

DBAPI: Add param to control capturing of db.statement.parameters#156
lzchen merged 7 commits intoopen-telemetry:masterfrom
stschenk:dbapi-skip-params-by-default

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!

stschenk and others added 2 commits November 8, 2020 08:44
Co-authored-by: Yusuke Tsutsumi <tsutsumi.yusuke@gmail.com>

- 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