sendDefaultPii is reported as deprecated on ReactNativeOptions although dataCollection is hidden
維護者通常 1 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 85/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- react-native, typescript
- 領域
- mobile
研究方向
先從 ReactNativeOptions 和 BaseReactNativeOptions 的宣告開始,接著檢查 @sentry/core/build/types/types/options.d.ts 中繼承的 Options 型別。驗證 TypeScript 語言服務在 Omit 清單周圍的行為,並執行儲存庫的型別檢查或測試。當 sendDefaultPii 仍可在 React Native 中使用,且不會觸發 deprecated 診斷時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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-deprecatedenabled
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-native8.29.0. - Pass
sendDefaultPii: truetoSentry.init(). - Run a type-aware deprecation check, such as
typescript/no-deprecatedin 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 {}
- 主要語言
- TypeScript
- 星號
- 1.8k
- 分支
- 372
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 105
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-react-native 的其他 Issue
-
Bug React-Native Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 74/100
getsentry/sentry-react-native#6913 · 1 則留言 ·
維護者通常 1 天內回覆
-
React-Native Replays Task
難度 2/5 1-3 小時 新手友好度 88/100
getsentry/sentry-react-native#6680 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement React-Native
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-react-native#6143 · 2 則留言 ·
維護者通常 1 天內回覆
-
React-Native Task User Feedbacks
難度 2/5 1-3 小時 新手友好度 84/100
getsentry/sentry-react-native#5932 · 2 則留言 ·
維護者通常 1 天內回覆
-
React-Native Replays Task
難度 2/5 1-3 小時 新手友好度 65/100
getsentry/sentry-react-native#5882 · 1 則留言 ·
維護者通常 1 天內回覆
查看 getsentry/sentry-react-native 的全部 Issue
相似的 Issue
-
area:workflow bug ready-for-human
難度 1/5 1 小時以內 新手友好度 78/100
fil-donadoni/tolaria#6108 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
apache/rocketmq-dashboard#7234 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
vitest-dev/vitest#11656 ·
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 2/5 1-3 小時 新手友好度 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
ehmpathy/rhachet-roles-bhrain#655 ·
維護者通常 1 天內回覆