What React Native libraries do you use?
Expo (mobile only), Expo Application Services (EAS), React Navigation, Hermes, RN New Architecture
Are you using sentry.io or on-premise?
sentry.io (SaS)
Are you using any other error monitoring solution alongside Sentry?
Yes, Firebase Crashlytics
@sentry/react-native SDK Version
8.29.0 (@sentry/core 10.75.2)
How does your development environment look like?
- expo ~57.0.26
- react-native 0.86.3
- typescript ~6.0.3
- oxlint 1.86.0 with oxlint-tsgolint 7.0.2003,
typescript/no-deprecated enabled
Sentry.init()
Sentry.init({
dsn: '...',
enabled: !__DEV__,
environment: env.isProduction ? 'prod' : 'dev',
sendDefaultPii: true,
enableLogs: true,
replaysOnErrorSampleRate: 1.0,
tracesSampleRate: 1.0,
integrations: [Sentry.mobileReplayIntegration(), navigationIntegration],
});
Steps to Reproduce
- Use
@sentry/react-native 8.29.0.
- Pass
sendDefaultPii: true to Sentry.init().
- Run a type-aware deprecation check, such as
typescript/no-deprecated in oxlint.
Expected Result
sendDefaultPii is not reported as deprecated on ReactNativeOptions.
#6345 hid dataCollection from the React Native options and says to keep using sendDefaultPii until full support lands (#5996).
The wizard v8 template also still generates sendDefaultPii: true for React Native.
Actual Result
typescript(no-deprecated): `sendDefaultPii` is deprecated. Use the option instead, which lets you control each category of collected data individually. `sendDefaultPii` will be removed in the next major version (v11). ...
BaseReactNativeOptions redeclares sendDefaultPii without @deprecated, but ReactNativeOptions extends Omit<Options<ReactNativeTransportOptions>, '_experiments' | 'dataCollection'> first.
The resolved sendDefaultPii property therefore has a single declaration, the deprecated one from @sentry/core/build/types/types/options.d.ts.
I checked this with the TypeScript language service.
When 'sendDefaultPii' is added to the Omit list, the property resolves to the BaseReactNativeOptions declaration and the @deprecated tag is gone:
export interface ReactNativeOptions
extends Omit<Options<ReactNativeTransportOptions>, '_experiments' | 'dataCollection' | 'sendDefaultPii'>,
BaseReactNativeOptions {}
What React Native libraries do you use?
Expo (mobile only), Expo Application Services (EAS), React Navigation, Hermes, RN New Architecture
Are you using sentry.io or on-premise?
sentry.io (SaS)
Are you using any other error monitoring solution alongside Sentry?
Yes, Firebase Crashlytics
@sentry/react-native SDK Version
8.29.0 (
@sentry/core10.75.2)How does your development environment look like?
typescript/no-deprecatedenabledSentry.init()
Steps to Reproduce
@sentry/react-native8.29.0.sendDefaultPii: truetoSentry.init().typescript/no-deprecatedin oxlint.Expected Result
sendDefaultPiiis not reported as deprecated onReactNativeOptions.#6345 hid
dataCollectionfrom the React Native options and says to keep usingsendDefaultPiiuntil full support lands (#5996).The wizard v8 template also still generates
sendDefaultPii: truefor React Native.Actual Result
BaseReactNativeOptionsredeclaressendDefaultPiiwithout@deprecated, butReactNativeOptionsextendsOmit<Options<ReactNativeTransportOptions>, '_experiments' | 'dataCollection'>first.The resolved
sendDefaultPiiproperty therefore has a single declaration, the deprecated one from@sentry/core/build/types/types/options.d.ts.I checked this with the TypeScript language service.
When
'sendDefaultPii'is added to theOmitlist, the property resolves to theBaseReactNativeOptionsdeclaration and the@deprecatedtag is gone: