Skip to content

DataCollection phase 2: gate database query data #5433

Open

Description

@jamescrosswell

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeFeatureNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions