Part of #5420. Phase 2 — consumer migration (new gating; default true keeps it behavior-neutral).
Gate database query data on resolved DatabaseQueryData:
src/Sentry.DiagnosticSource/Internal/DiagnosticSource/SentrySqlListener.cs:213 — raw CommandText as span description (currently unconditional).
EFCommandDiagnosticSourceHelper.cs, EFQueryCompilerDiagnosticSourceHelper.cs — EF Core spans.
src/Sentry.EntityFramework/SentryCommandInterceptor.cs:52-65, SentryQueryPerformanceListener.cs — EF6 breadcrumbs/spans.
Per spec: sanitized statements are always collected; DatabaseQueryData gates bound parameters/values. Since .NET currently attaches raw CommandText unconditionally, decide whether false means dropping the statement or parameterized-statement-only. JS analogue: getsentry/sentry-javascript#22219 (Supabase re-gated from userInfo to databaseQueryData — getting the category right the first time matters).
Part of #5420. Phase 2 — consumer migration (new gating; default
truekeeps it behavior-neutral).Gate database query data on resolved
DatabaseQueryData:src/Sentry.DiagnosticSource/Internal/DiagnosticSource/SentrySqlListener.cs:213— rawCommandTextas span description (currently unconditional).EFCommandDiagnosticSourceHelper.cs,EFQueryCompilerDiagnosticSourceHelper.cs— EF Core spans.src/Sentry.EntityFramework/SentryCommandInterceptor.cs:52-65,SentryQueryPerformanceListener.cs— EF6 breadcrumbs/spans.Per spec: sanitized statements are always collected;
DatabaseQueryDatagates bound parameters/values. Since .NET currently attaches rawCommandTextunconditionally, decide whetherfalsemeans dropping the statement or parameterized-statement-only. JS analogue: getsentry/sentry-javascript#22219 (Supabase re-gated fromuserInfotodatabaseQueryData— getting the category right the first time matters).