getsentry / getsentry/sentry-java

File I/O Instrumentation with OkHttp Cache enabled

Đang mở
#4,566 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Android Feature Spans
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ả

### Problem Statement

When I enabled [caching]() in the OkHttp client and activated File I/O Sentry instrumentation, I observed that the `file.write` span always ends with a `deadline_exceeded` status. This occurs due to the way OkHttp's `DiskLruCache` manages the journal file internally - it keeps the *journalWriter* open until explicitly closed.

Image

Sentry SDK: `8.13.2`
Sentry Gradle Plugin: `5.8.0`

### Solution Brainstorm

Ideally, we want the span to be properly closed each time cached data is flushed (written). Perhaps the Sentry SDK could handle this differently if the File I/O operation originates from the OkHttp cache. Alternatively, it would be beneficial if we could filter this span out, preventing its duration from contributing to the total `ui.load` time.

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

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

Đánh giá

Issue này chưa được đánh giá.

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.