getsentry / getsentry/sentry-react-native
Add `dataCollection` option type and deprecate `sendDefaultPii`
- 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
Assessment
This issue has not been assessed yet.