getsentry / getsentry/sentry-react-native

Add `dataCollection` option type and deprecate `sendDefaultPii`

Open
#5,996 1 comment 0 reactions 0 assignees View on GitHub
Errors React-Native Task
Dominant language
TypeScript
Stars
1.8k
Forks
366
Avg merge
1d 9h
Merged PRs (30d)
89

Description

Add the new `dataCollection` option to `ReactNativeOptions` with the relevant subset of options from the [spec]().

## Tasks

* Define `DataCollectionOptions` type with at minimum: `userInfo`, `genAIInputs`, `genAIOutputs`, `stackFrameVariables`, `frameContextLines`
* Add `dataCollection` to `ReactNativeOptions` in `options.ts`
* Deprecate `sendDefaultPii` with a JSDoc `@deprecated` annotation
* Add backward-compat bridging: if `sendDefaultPii` is set but `dataCollection` is not, map `sendDefaultPii: true` → `dataCollection: { userInfo: true }`
* Emit a console warning when `sendDefaultPii` is used, pointing to `dataCollection`
* Add tests for the bridging logic

## References

* `packages/core/src/js/options.ts` — option definitions
* Spec: [https://develop.sentry.dev/sdk/foundations/client/data-collection/]()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.