-
Notifications
You must be signed in to change notification settings - Fork 357
Feature/db statement sanitizer #3554 #3555
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
base: main
Are you sure you want to change the base?
Feature/db statement sanitizer #3554 #3555
Conversation
martincostello
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just skim-read at this stage. Will review properly if we decide we do want to implement this functionality.
src/OpenTelemetry.Instrumentation.SqlClient/SqlClientTraceInstrumentationOptions.cs
Outdated
Show resolved
Hide resolved
8c3b204 to
f4c711b
Compare
...etry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
|
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. |
|
My proposal for #3554 3554
Changes
Introduce a configurable "db-statement sanitizer" option for .NET database instrumentations and connect it to the existing
sanitizeQueryparameter: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
CHANGELOG.mdfiles updated for non-trivial changes