Repository navigation
ref: remove the experimental DataCollectionOptions.DatabaseQueryData until .NET collects query data - #5933
Open
jamescrosswell wants to merge 6 commits into
Open
ref: remove the experimental DataCollectionOptions.DatabaseQueryData until .NET collects query data#5933jamescrosswell wants to merge 6 commits into
jamescrosswell wants to merge 6 commits into
Conversation
…tabase spans and EF6 breadcrumbs The raw CommandText attached as the SqlClient, EF Core and EF6 span descriptions, and as EF6 breadcrumbs, is now dropped when an app calls ConfigureDataCollection with DatabaseQueryData = false. DatabaseQueryData bridges to true when DataCollection is not configured: the statement was always attached regardless of SendDefaultPii, and spec 0.16.0 requires keeping legacy behaviour until the user opts in. Closes #5433 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5933 +/- ##
==========================================
- Coverage 77.70% 77.70% -0.01%
==========================================
Files 535 535
Lines 19731 19727 -4
Branches 3934 3932 -2
==========================================
- Hits 15332 15328 -4
Misses 3544 3544
Partials 855 855 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yData Reverses option 2 from #5433. sentry-python, sentry-java and sentry-go all send the statement whatever databaseQueryData says, and the spec scopes the category to bound parameters, write payloads and result data. .NET collects none of those, so DatabaseQueryData has no effect yet; the XML docs now say so, and tests pin the statement on SqlClient, EF Core and EF6 spans. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They documented and tested DatabaseQueryData as having no effect; the option is being removed instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing in .NET collects what the option controls: bound query parameters, write payloads or returned result data. Statements are outside it per the spec. Reverting this commit restores the option, its bindable entry, the resolver accessor and their tests, for the integration that first collects query parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
jamescrosswell
marked this pull request as ready for review
November 18, 2026 01:37
This branch has not been deployed
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.
This PR removes the experimental
DataCollectionOptions.DatabaseQueryDataoption. Nothing in .NET collects the data it controls, so setting it had no effect. #5955 brings it back with the first integration that collects query parameters.Part of #5420 (Phase 2).
Closes #5433
Why remove it instead of gating the SQL statement
The spec scopes
databaseQueryDatato bound query parameters, write payloads and returned result data. Query statements (db.query.text) and structural metadata are explicitly outside it. Our SqlClient, EF Core and EF6 integrations attach the statement and structural metadata, and nothing else.#5433 settled on option 2: treat the raw, unsanitized
CommandTextas gated data until a sanitizer exists. This PR first implemented that. Checking the other SDKs reversed it:db.paramsinrecord_sql_queries), MongoDB values, Redis arguments, and ClickHouse parameters and results. The statement is always sent, exactly as the driver received it.?. It has noDatabaseQueryDataoption.Python and Java send statements that are just as unsanitized as .NET's. Gating
CommandTextwould have made .NET the only SDK that drops the statement. Keeping the option without a consumer, as Java does, would leave .NET users with a setting that does nothing. #5853 removed the other categories that had no consumer for the same reason, and this does the same here.Notes for review
!in the title.DataCollectionOptionsis[Experimental], and craft treats!as a major version bump.main, so DataCollection: capture database query parameters and reintroduce DatabaseQueryData #5955 can start by reverting it.🤖 Generated with Claude Code