Feature/db statement sanitizer #3554
My proposal for #3554 3554
Changes
Introduce a configurable "db-statement sanitizer" option for .NET database instrumentations and connect it to the existing sanitizeQuery parameter:
-
Add a public configuration option, for example on the relevant instrumentation options type(s), such as:
-
Wire this option into the code path that calls
ApplyConventionsForQueryText, passingsanitizeQuery: options.DbStatementSanitizerEnabled. -
Keep
DbStatementSanitizerEnableddefaulting totrueto preserve the current safe-by-default behavior and stay consistent with the OpenTelemetry guidance thatdb.statementshould generally be sanitized by default.
Merge requirement checklist
- [x] CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
- [x] Unit tests added/updated
- [ ] Appropriate
CHANGELOG.mdfiles updated for non-trivial changes - [ ] Changes in public API reviewed (if applicable)
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: alexander-kucherov / name: Alexander Kucherov (10a88357bcf1f71cf778ecf39ba14eef74308103, 88bc1ebd1b7058e39a697a8181726e8ac109f317, f4c711b2bce3c1179c7139ecc23ca445b4e5fce4)
This PR was marked stale due to lack of activity. It will be closed in 7 days.
@martincostello just a gentle ping to see if you could review this PR when it’s convenient.
Will review properly if we decide we do want to implement this functionality.
This PR was marked stale due to lack of activity. It will be closed in 7 days.