getsentry / getsentry/sentry-java
File I/O Instrumentation with OkHttp Cache enabled
- Linguagem predominante
- Kotlin
- Estrelas
- 1.4k
- Forks
- 478
- Merge médio
- 3d 4h
- PRs com merge (30d)
- 72
Descrição
### 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.
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.
Guia de contribuição
Direção de pesquisa
Comece reproduzindo o problema com o cache do OkHttp e a instrumentação de Sentry File I/O; em seguida, inspecione o comportamento de DiskLruCache journalWriter e o ciclo de vida do span de escrita de arquivo do SDK. Confirme como as escritas em cache são representadas em ui.load e defina como concluído eliminar o status incorreto deadline_exceeded sem perder a instrumentação útil de File I/O.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- android, kotlin
- Domínio
- mobile-dev, observability, performance
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 35/100