open-telemetry / open-telemetry/opentelemetry-python-contrib
Missing db.statement / db.operation sensitive data sanitization option
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
According to semantic-conventions, a DB instrumentation should have the option to sanitize sensitive data from either db.statement or db.operation attributes. Consider using instrumentation.dbapi to reduce instrumentation-specific logic & tests. This issue seems relevant for the following instrumentations:
- #1544
- #1545
- #1546
- #1547
- #1548
- #1549
- #1734
13042023 Edit: Updating this issue with database specifications to add db.statement attribution only if it's sanitized.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#call-level-attributes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked database semantic conventions and the shared instrumentation.dbapi approach, then review the listed database instrumentation issues (#1544–#1549 and #1734). Done means the relevant instrumentations provide an option to sanitize sensitive db.statement or db.operation attributes, with the specification’s conditions reflected in coverage and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100