[Instrumentation.EntityFrameworkCore] Add QueryTextSanitizer delegate - #4901
Draft
PetarJerinic wants to merge 8 commits into
Draft
[Instrumentation.EntityFrameworkCore] Add QueryTextSanitizer delegate#4901PetarJerinic wants to merge 8 commits into
PetarJerinic wants to merge 8 commits into
Conversation
…. It allows callers to supply their own sanitization for query text captured as db.query.text and db.statement.
Contributor
|
Welcome, contributor! Thank you for your contribution to opentelemetry-dotnet-contrib. Important reminders:
|
Pull request dashboard statusWaiting on the author · refreshed 2026-08-20 15:21 UTC Move out of draft to request review. Status above doesn't look right?
|
Contributor
Author
|
@martincostello I created a draft PR based on the discussion in #4348. Please take a look when you get the chance. |
…ueryTextSanitizerShouldNotSanitizeProvidersThatAreNotSqlLike to better represent non sanitized providers
Member
See #3370 (comment) for background on lack of support for CosmosDB. |
Contributor
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
…y-text-sanitizer # Conflicts: # src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4348
Changes
Adds a
QueryTextSanitizerdelegate toEntityFrameworkInstrumentationOptions, following the shape discussed on the issue: a single delegate, while keeping the existing behavior wherenulldisables sanitization at the caller's own risk.On delegate exception, no query text is emitted, please confirm this is the preference.
Not covered
ExecutingSqlQuery,ExecutingReadItem,ExecutedReadNextand others). Suggestion is to open a separate issue for it.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes