getsentry / getsentry/sentry-dotnet

DataCollection phase 2: gate database query data

Open
#5,433 1 comment 0 reactions 0 assignees View on GitHub
.NET Feature
Dominant language
C#
Stars
770
Forks
248
Avg merge
2d 22h
Merged PRs (30d)
51

Description

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

Contributor guide

Open the contributing guide

Research direction

Read #5420 and the data-collection specification first, then inspect SentrySqlListener.cs:213, the two EF Core diagnostic helpers, SentryCommandInterceptor.cs:52-65, and SentryQueryPerformanceListener.cs. Determine whether false drops raw statements or retains parameterized statements, then verify that sanitized statements remain collected while DatabaseQueryData gates bound parameters and values.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.