sendDefaultPii is reported as deprecated on ReactNativeOptions although dataCollection is hidden
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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
- 派生
- 369
- 平均合并
- 18 小时 16 分钟
- 30 天内合并 PR
- 103
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-react-native 的其他 Issue
-
Improvement Logs React-Native Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 82/100
getsentry/sentry-react-native#6842 · 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
-
难度 2/5 1-3 小时 新手友好度 85/100
umbraco/Umbraco-CMS-MCP-Dev#512 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
wimpysworld/sidra#290 ·
维护者通常 1 天内回复
-
defuFn invokes function values for inherited default properties可能已有人在做 @xiehuanyi 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
-
feature request good first issue
难度 2/5 1-3 小时 新手友好度 85/100
TabularisDB/tabularis#853 ·
维护者通常 1 天内回复
-
难度 2/5 1 小时以内 新手友好度 85/100
capricorn86/happy-dom#2474 ·
维护者通常 2 天内回复