Skip to content

Commit

Permalink
feat: enable attach stack traces and disable attach threads by default (
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Sep 15, 2020
1 parent 1f53b8d commit 14d1f43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sentry/src/main/java/io/sentry/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ public class SentryOptions {
private @Nullable String dist;

/** When enabled, threads are automatically attached to all logged events. */
private boolean attachThreads = true;
private boolean attachThreads;

/**
* When enabled, stack traces are automatically attached to all threads logged. Stack traces are
* always attached to exceptions but when this is set stack traces are also sent with threads
*/
private boolean attachStacktrace;
private boolean attachStacktrace = true;

/** Whether to enable or disable automatic session tracking. */
private boolean enableSessionTracking = true;
Expand Down
10 changes: 10 additions & 0 deletions sentry/src/test/java/io/sentry/SentryOptionsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,14 @@ class SentryOptionsTest {

assertEquals(clientName, sentryOptions.sentryClientName)
}

@Test
fun `when options is initialized, attachThreads is false`() {
assertFalse(SentryOptions().isAttachThreads)
}

@Test
fun `when options is initialized, attachStacktrace is true`() {
assertTrue(SentryOptions().isAttachStacktrace)
}
}

0 comments on commit 14d1f43

Please sign in to comment.