Expose Cocoa MetricKit report selection (enabledMetricReports / enabledDiagnosticReports)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ios, react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Start with packages/core/src/js/options.ts and packages/core/ios/RNSentryStart.m, then trace how wrapper.ts forwards options to native. First verify on a device whether an untyped metrickit dictionary reaches Cocoa; then check Cocoa’s accepted diagnostic report values and the experimental API pattern. Done means typed, documented options pass native tests and work across the listed build modes, architectures, and platforms.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
sentry-cocoa 9.33.0 (bumped in #6987) lets apps choose which MetricKit reports the SDK collects. The RN SDK has no way to set this today. It only exposes enableMetricKit and enableMetricKitRawPayload (packages/core/src/js/options.ts).
New in Cocoa 9.33.0:
options.experimental.metrickit.enabledMetricReportscan now be set through theenabledMetricReportskey of themetrickitoptions dictionary, which also accepts"all"(getsentry/sentry-cocoa#9490).- New metric reports on iOS/macOS 27+:
animationTotalHitchTime,animationTotalAnimationTime,metalFramesPerSecond,metalFrameCount,metalActiveDrawingDuration. On 27+,animationScrollHitchTimeRatiois no longer sent (getsentry/sentry-cocoa#9476). - Memory exception diagnostics on iOS 27+, collected when
enabledDiagnosticReportscontains.memoryException(getsentry/sentry-cocoa#9465).
Why this isn't blocked like #6926
SentryExperimentalOptions.metrickit is @nonobjc, which is part of what blocks #6926. But RN builds Cocoa options with RNSentryInternal optionsFromDictionary (packages/core/ios/RNSentryStart.m), and JS forwards options it doesn't know about to native (wrapper.ts initNativeSdk spreads the remaining options). So the new metrickit dictionary key should reach Cocoa's own parser without a Swift shim. That means metrickit: { enabledMetricReports: 'all' } may already work today, just without types. This hasn't been checked on a device.
Proposal
Wait until Cocoa takes these options out of experimental. Cocoa made a breaking change to the MetricReport enum in 9.33.0, so the shape is still changing. After that:
- Add a typed, iOS-only option under
_experiments, for example_experiments.metricKit: { enabledMetricReports?: string[] | 'all'; enabledDiagnosticReports?: string[] | 'all' }, and pass it through as Cocoa'smetrickitdictionary. - Check which
enabledDiagnosticReportsvalues the dictionary parser accepts. #9490 only mentionsenabledMetricReports. - Document that this only works when
enableMetricKit: true, and which reports need iOS 27+.
Acceptance criteria
- Verified on a device whether an untyped
metrickitdictionary already reaches Cocoa (and record the result). - Typed experimental option added, with JSDoc, and the API report regenerated.
- Works with CocoaPods (static/dynamic) and SwiftPM, on the old and new architecture. It does nothing on Android and other platforms.
- Tests cover the option being passed to the native options.
Related: #6926, #6457, #6987
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 371
- Merge trung bình
- 22 giờ 3 phút
- Pull request đã merge (30 ngày)
- 106
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-react-native
-
React-Native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-react-native#7073 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improvement React-Native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
getsentry/sentry-react-native#7055 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
React-Native Replays Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
getsentry/sentry-react-native#6680 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improvement React-Native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getsentry/sentry-react-native#6143 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
React-Native Task User Feedbacks
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
getsentry/sentry-react-native#5932 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/sentry-react-native
Issue tương tự
-
area:config bug priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Doezer/Questarr#1451 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
sidebandstudio/clawtrate#1156 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
WenyuChiou/agent-board#1993 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Colorado-Startups/coloradostartups.org#151 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jarrodwatts/claude-hud#883 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày