getsentry / getsentry/sentry-java

SDK sets the wrong transaction to ANR events detected during navigation.

Đang mở
#5,614 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Android Errors Improvement Platform: Java
Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
67

Mô tả

### Integration

sentry-android

### Build System

Gradle

### AGP Version

NA

### Proguard

Enabled

### Other Error Monitoring Solution

No

### Version

8.32.0

### Steps to Reproduce

This is a hard-to-reproduce issue as it seems to happen only when an ANR is detected while the user is navigating between views in the Android app.

The order of events is:
1. User is in ScreenA
2. User Navigates to Screen B (This creates a new transaction in the SDK scope, replacing the transaction from ScreenA)
3. During the navigation, the app is killed/ANR event is detected
4. The SDK sends the ANR event associated with the transaction from ScreenB

### Expected Result

The ANR event's transaction matches the stack trace and other information in the event.

### Actual Result

The ANR event in Sentry has the stack trace pointing to ScreenA, with all other information pointing to this view. However, the event's transaction (and by extension the event's culprit) points to ScreenB.

This causes user confusion as the culprit showing next to the issue's title now points to a view unrelated to the stack trace where the ANR happened.

[Code where the culprit is set in Sentry. ](https://github.com/getsentry/sentry/blob/master/src/sentry/culprit.py)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the linked src/sentry/culprit.py to understand how the transaction affects the culprit, then trace sentry-android navigation transaction handling and ANR event capture. Reproduce the ScreenA-to-ScreenB navigation sequence if possible; done means the ANR event's transaction and culprit match the screen represented by its stack trace.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android
Lĩnh vực
mobile, observability
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.