Repository navigation
ref: remove the experimental DataCollectionOptions.DatabaseQueryData until .NET collects query data - #5933
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>
ric-oliv
left a comment
There was a problem hiding this comment.
One small thing about Closes #5433. Right now #5433 is the only issue that mentions we send the raw CommandText, inline literals included, on SqlClient, EF Core and EF6 spans and on EF6 breadcrumbs. Your description says sanitizing statements is still the end state the spec describes, but nothing will track it once #5433 closes. JS and Go already replace literals with ? by default. What do you think about opening a small issue for it before this merges, or adding a line to #5420?
|
@ric-oliv good catch, thanks. #5964 now tracks sanitizing statements. It lists every place we attach them: SqlClient spans, EF Core command spans, EF6 spans and EF6 breadcrumbs. It also covers the EF Core query-compile spans, whose description is the LINQ expression rather than SQL, so they need handling of their own. It proposes replacing literals with |
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