-
@ApiStatus.Internal() public final class NativeEventCollectorCollects native crash events from the outbox directory. These events can be correlated with tombstone events from ApplicationExitInfo to avoid sending duplicate crash reports.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classNativeEventCollector.NativeEventDataHolds a native event along with its source file for later deletion.
-
Constructor Summary
Constructors Constructor Description NativeEventCollector(SentryAndroidOptions options)
-
Method Summary
Modifier and Type Method Description voidcollect()Scans the outbox directory and collects all native crash events. NativeEventCollector.NativeEventDatafindAndRemoveMatchingNativeEvent(long tombstoneTimestampMs)Finds a native event that matches the given tombstone timestamp. booleandeleteNativeEventFile(@NotNull() NativeEventCollector.NativeEventData nativeEventData)Deletes a native event file from the outbox. -
-
Constructor Detail
-
NativeEventCollector
NativeEventCollector(SentryAndroidOptions options)
-
-
Method Detail
-
collect
void collect()
Scans the outbox directory and collects all native crash events. This method should be calledonce before processing tombstones. Subsequent calls are no-ops.
-
findAndRemoveMatchingNativeEvent
@Nullable() NativeEventCollector.NativeEventData findAndRemoveMatchingNativeEvent(long tombstoneTimestampMs)
Finds a native event that matches the given tombstone timestamp. If a match is found, it isremoved from the internal list so it won't be matched again.
This method will lazily collect native events from the outbox on first call.
- Parameters:
tombstoneTimestampMs- the timestamp from ApplicationExitInfo
-
deleteNativeEventFile
boolean deleteNativeEventFile(@NotNull() NativeEventCollector.NativeEventData nativeEventData)
Deletes a native event file from the outbox.
- Parameters:
nativeEventData- the native event data containing the file reference
-
-
-
-