getsentry / getsentry/sentry-java

Improve Envelope Caching process

Open
#3,061 2 comments 0 reactions 0 assignees View on GitHub
Android Improvement
Dominant language
Kotlin
Stars
1.4k
Forks
478
Avg merge
2d 23h
Merged PRs (30d)
67

Description

### Description

As of now [we save envelopes to disk right before try to send them](https://github.com/getsentry/sentry-java/blob/0bd723b1c59af639c4a86bbade526e0108096f8e/sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java#L227-L247).
In case of a slow network connection this could lead to envelopes queuing up and being potentially lost in case of an app termination.

We should try to store to disk as early as possible, and then enqueue the envelope for sending over the wire.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.