Skip to content

Commit 936a2f0

Browse files
committed
add historical tombstone option
1 parent 4f03857 commit 936a2f0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroidOptions.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,17 @@ public interface BeforeCaptureCallback {
217217
*/
218218
private boolean reportHistoricalAnrs = false;
219219

220+
/**
221+
* Controls whether to report historical Tombstones from the {@link ApplicationExitInfo} system
222+
* API. When enabled, reports all of the Tombstones available in the {@link
223+
* ActivityManager#getHistoricalProcessExitReasons(String, int, int)} list, as opposed to
224+
* reporting only the latest one.
225+
*
226+
* <p>These events do not affect crash rate nor are they enriched with additional information from
227+
* {@link IScope} like breadcrumbs.
228+
*/
229+
private boolean reportHistoricalTombstones = false;
230+
220231
/**
221232
* Controls whether to send ANR (v2) thread dump as an attachment with plain text. The thread dump
222233
* is being attached from {@link ApplicationExitInfo#getTraceInputStream()}, if available.
@@ -593,6 +604,14 @@ public void setReportHistoricalAnrs(final boolean reportHistoricalAnrs) {
593604
this.reportHistoricalAnrs = reportHistoricalAnrs;
594605
}
595606

607+
public boolean isReportHistoricalTombstones() {
608+
return reportHistoricalTombstones;
609+
}
610+
611+
public void setReportHistoricalTombstones(final boolean reportHistoricalTombstones) {
612+
this.reportHistoricalTombstones = reportHistoricalTombstones;
613+
}
614+
596615
public boolean isAttachAnrThreadDump() {
597616
return attachAnrThreadDump;
598617
}

0 commit comments

Comments
 (0)