Skip to content

Commit 2d6df91

Browse files
docs(android): Note that the dropped-event session API writes to disk
Persisting the session is synchronous so the unhandled marker is durable by the time the call returns, which means callers must stay off the main thread. Say so where hybrid SDK authors will read it. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b55a21f commit 2d6df91

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ public static SentryId captureEnvelopeNonTerminating(final @NotNull byte[] envel
276276
*
277277
* <p>Do not call this for events dropped by {@code beforeSend} or ignored exception types.
278278
*
279+
* <p>Persisting the session is a blocking disk write on the calling thread, so call this off the
280+
* main thread as the hybrid SDKs do. It is synchronous on purpose: a deferred write would not be
281+
* on disk yet if the process dies right after this returns.
282+
*
279283
* @param crashed {@code true} if the dropped error was unhandled ({@code
280284
* mechanism.handled=false})
281285
*/

0 commit comments

Comments
 (0)