getsentry / getsentry/sentry-dotnet

DataCollection phase 1: add option types (no-op)

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

Description

Part of getsentry/sentry-dotnet#5420. Phase 1 — foundation.

Add the public option shape as a **no-op** (nothing wired yet), mirroring the [spec]() with .NET idioms:

* `SentryOptions.DataCollection` → new `DataCollectionOptions` class: `UserInfo`, `Cookies`, `HttpHeaders` (`Request`/`Response`), `HttpBodies`, `UrlQueryParams`, `GraphQL` (`Document`/`Variables`), `GenAI` (`Inputs`/`Outputs`), `DatabaseQueryData`, `Queues`, `StackFrameVariables`, `FrameContextLines`. All properties optional/nullable (unset = fall through to defaults/bridge).
* `KeyValueCollectionBehavior` with static factories: `Off`, `DenyList(params string[] extraTerms)`, `AllowList(params string[] keys)` (JS simplified the spec's `mode:` shape to `boolean | {allow} | {deny}`; we should pick an idiomatic equivalent).
* `[Flags] HttpBodyTypes` enum: `None`, `IncomingRequest`, `OutgoingRequest`, `IncomingResponse`, `OutgoingResponse`, `All`.
* Use **final spec names** from day one (JS had to rename `queryParams` → `urlQueryParams` post-ship: [getsentry/sentry-javascript#22217]()). Include `Queues`/`StackFrameVariables`/`FrameContextLines` even though managed code can't act on them yet (forwarded to native later; late category additions forced JS re-gating: [getsentry/sentry-javascript#22219]()).
* Regenerate API approval files (`test/**/ApiApprovalTests.Run.*.verified.txt`).

JS reference: `packages/core/src/types/datacollection.ts` ([getsentry/sentry-javascript#20965]()).

Contributor guide

Open the contributing guide

Research direction

Start with SentryOptions and the linked data-collection spec, then compare the JS reference at packages/core/src/types/datacollection.ts for the requested public names and option shapes. Add the no-op types and regenerate test/**/ApiApprovalTests.Run.*.verified.txt; done means the final categories, factories, enum values, and API approvals are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.