opentelemetry-python-contrib
opentelemetry-python-contrib copied to clipboard
Add botocore db.statement sanitization for dynamoDB
trafficstars
Description
Added an optional query sanitizer to the botocore dynamoDB instrumentation. Usage BotocoreInstrumentor().instrument(sanitize_query=True)
This will affect the DB_STATEMENT value to contain the original query or sanitized one.
Fixes open-telemetry/opentelemetry-specification#1544
Following the specification discussion here
Type of change
Please delete options that are not relevant.
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
How Has This Been Tested?
- [x] Test A db.statement has been sanitized
- [x] Test B no side affects occurred on a query without a db.statement attribute
Does This PR Require a Core Repo Change?
- [x] No.
Checklist:
- [x] Followed the style guidelines of this project
- [x] Changelogs have been updated
- [x] Unit tests have been added
- [x] Documentation has been updated
@mariojonke approve if your comments are addressed or request changes to prevent the accidental merge.
@nemoshlag are there any updates on the comments from @mariojonke?