Support RN SDK use in libraries
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react-native
- Lĩnh vực
- mobile, observability
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với React Native 0.71.11, Hermes, Metro và Sentry React Native SDK 6.2.0 trên Android và iOS, sử dụng callback beforeSend của Sentry.init và stacktrace mẫu. Theo dõi cách tên tệp của stacktrace.frames được tạo ra và xác định kết quả hoàn thành là sự phân biệt đáng tin cậy giữa thư viện và client, hoặc một giới hạn và phương án thay thế được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What React Native libraries do you use?
React Native without Frameworks
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.2.0
How does your development environment look like?
Sentry React Native SDK Version: 6.2.0
React Native Version: 0.71.11
Hermes Enabled: Yes
Platforms Tested: Android, iOS
Build Tools: Metro bundler
Sentry.init()
Sentry.init({
dsn: 'https://[email protected]/library-project-id',
release: '0.0.1',
beforeSend(event) {
// Attempting to filter errors based on stacktrace
const isFromLibrary = event.exception?.values?.some((value) =>
value.stacktrace?.frames?.some((frame) =>
frame.filename?.includes('/node_modules/@my-library-name')
)
);
return isFromLibrary ? event : null;
},
});
Steps to Reproduce
I am unable to effectively filter errors in my React Native project using stacktrace.frames in the beforeSend callback. Despite providing proper logic to inspect the stack trace and filenames, the error events do not include sufficient information to reliably distinguish between errors originating from my project( my project is react native library ) and those from the client app.
This has become a critical issue for my project, where I am building a React Native SDK that will be integrated into client apps. I want to ensure that only errors from my SDK are sent to my Sentry project, while unexpected errors from client apps (using their own DSN and release) are excluded.
Expected Result
- I expect the stacktrace.frames[].filename to include the library name or a clear identifier (e.g., node_modules/@my-library or similar) that shows where the error originates. This would make it much easier to filter errors specific to the project.
- If this is not posible, is there another reliable way to distinguish between errors originating from the library and client app without relying solely on the stacktrace? Thanks
Actual Result
Stacktrace Does Not Contain library Identifiers:
The stacktrace.frames[].filename does not include a clear path to node_modules/@my/library-name or any other library-specific identifier.
Example stacktrace from a client app error:
"stacktrace": {
"frames": [
{
"filename": "app:///Pressability.js",
"function": "responderEventHandlers.onResponderRelease",
"lineno": 525,
"colno": 27
},
{
"filename": "app:///index.js",
"function": "TouchableOpacity.props.onPress",
"lineno": 171,
"colno": 27
}
]
}
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 369
- Merge trung bình
- 18 giờ 31 phút
- Pull request đã merge (30 ngày)
- 100
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
-
sendDefaultPii is reported as deprecated on ReactNativeOptions although dataCollection is hiddenĐang mởBug React-Native Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-react-native#6830 · 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
-
React-Native Replays Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
getsentry/sentry-react-native#5882 · 1 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ự
-
Link Checker ReportĐang mởautomated issue report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
databendlabs/databend-docs#3511 ·
-
area/dashboard kind/bug QA/dev-automation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rancher/dashboard#19379 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
perf(core): getComments() runs the approved count and the comment list as two sequential queriesĐang mởarea/core bot:bug bot:working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
emdash-cms/emdash#3905 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
lingdojo/kana-dojo#31728 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))Có thể đã có người làm @zjncs đã nhận hôm nay. Đang mởcomponent:tokenless
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
agentic-os-org/ANOLISA#6112 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày