Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

make ANR 5s by default #388

Merged
merged 2 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public final class SentryAndroidOptions extends SentryOptions {
*/
private boolean anrEnabled = true;

/** ANR Timeout internal in Millis Default is 4000 = 4s Used by AnrIntegration */
private long anrTimeoutIntervalMillis = 4000;
/** ANR Timeout internal in Millis Default is 5000 = 5s Used by AnrIntegration */
private long anrTimeoutIntervalMillis = 5000;

/** Enable or disable ANR on Debug mode Default is disabled Used by AnrIntegration */
private boolean anrReportInDebug = false;
Expand Down Expand Up @@ -69,7 +69,7 @@ public void setAnrTimeoutIntervalMills(long anrTimeoutIntervalMillis) {
}

/**
* Returns the ANR timeout internal in Millis Default is 4000 = 4s
* Returns the ANR timeout internal in Millis Default is 5000 = 5s
*
* @return the timeout in millis
*/
Expand All @@ -78,7 +78,7 @@ public long getAnrTimeoutIntervalMillis() {
}

/**
* Sets the ANR timeout internal in Millis Default is 4000 = 4s
* Sets the ANR timeout internal in Millis Default is 5000 = 5s
*
* @param anrTimeoutIntervalMillis the timeout internal in Millis
*/
Expand Down
4 changes: 2 additions & 2 deletions sentry-sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<!-- how to set a custom debug level-->
<!-- <meta-data android:name="io.sentry.debug.level" android:value="info" />-->

<!-- To change the time used to watch for ANR. By default it's 4 seconds (4000 below as it's in milliseconds)-->
<!-- <meta-data android:name="io.sentry.anr.timeout-interval-millis" android:value="4000" />-->
<!-- To change the time used to watch for ANR. By default it's 5 seconds (5000 below as it's in milliseconds)-->
<!-- <meta-data android:name="io.sentry.anr.timeout-interval-millis" android:value="5000" />-->

<!-- Raise ANR events even if the debugger is attached-->
<!-- <meta-data android:name="io.sentry.anr.report-debug" android:value="true" />-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected void onCreate(Bundle savedInstanceState) {
.setOnClickListener(
view -> {
// Try cause ANR by blocking for 2.5 seconds.
// By default the SDK sends an event if blocked by at least 4 seconds.
// By default the SDK sends an event if blocked by at least 5 seconds.
// The time was configurable (see manifest) to 1 second for demo purposes.
// NOTE: By default it doesn't raise if the debugger is attached. That can also be
// configured.
Expand Down