Configuration option to stop/disable post-crash replay recording on Android

Đang mở
#6,040 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin
Lĩnh vực
mobile, observability

Hướng nghiên cứu

Bắt đầu với SentryReplayOptions và callback beforeErrorSampling, sau đó theo dõi cách các sự kiện crash trên Android tương tác với việc ghi session replay. Xác định hành vi cấu hình để replay dừng ngay lập tức sau khi một crash được capture, đồng thời xác minh rằng replay thông thường và việc sampling lỗi vẫn không bị ảnh hưởng.

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

Mô tả

Android Feature Platform: Java Replays
Problem Statement

Currently, when an error/crash occurs, the SDK samples the event and continues recording post-crash replay until the session naturally ends. This replay is absolutely useless for us. I need a purely configuration-based way to completely prevent or instantly cut off replay recording right after a crash event occurs.

Solution Brainstorm

I would like a new configuration option in SentryReplayOptions (or a built-in behavior within beforeErrorSampling) that automatically stops the replay recorder immediately after a crash event is captured.

For example, a flag like stopRecordingOnCrash:

SentryAndroid.init(context) { options ->
  options.sessionReplay.onErrorSampleRate = 1.0
  // Proposed flag to cut off recording instantly after a crash/unhandled exception
  options.sessionReplay.isStopRecordingOnCrash = true 

  options.sessionReplay.beforeErrorSampling =
    SentryReplayOptions.BeforeErrorSamplingCallback { event, hint ->
      event.isCrashed // Only capture replays for crashes
    }
}
Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
70

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-java

Tất cả issue của getsentry/sentry-java

Issue tương tự

Thêm issue về Kotlin

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.