Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow max threads to be configured via the manifest #1655

Merged
merged 1 commit into from
Apr 14, 2022
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 @@ -48,6 +48,7 @@ class ManifestConfigLoaderTest {
assertEquals(maxBreadcrumbs, 50)
assertEquals(maxPersistedEvents, 32)
assertEquals(maxPersistedSessions, 128)
assertEquals(maxReportedThreads, 200)
assertTrue(sendLaunchCrashesSynchronously)
@Suppress("DEPRECATION")
assertEquals(launchCrashThresholdMs, 5000)
Expand Down Expand Up @@ -86,6 +87,7 @@ class ManifestConfigLoaderTest {
putInt("com.bugsnag.android.MAX_BREADCRUMBS", 75)
putInt("com.bugsnag.android.MAX_PERSISTED_EVENTS", 52)
putInt("com.bugsnag.android.MAX_PERSISTED_SESSIONS", 64)
putInt("com.bugsnag.android.MAX_REPORTED_THREADS", 100)
putInt("com.bugsnag.android.LAUNCH_DURATION_MILLIS", 7000)
putBoolean("com.bugsnag.android.SEND_LAUNCH_CRASHES_SYNCHRONOUSLY", false)
putString("com.bugsnag.android.APP_TYPE", "react-native")
Expand Down Expand Up @@ -120,6 +122,7 @@ class ManifestConfigLoaderTest {
assertEquals(maxBreadcrumbs, 75)
assertEquals(maxPersistedEvents, 52)
assertEquals(maxPersistedSessions, 64)
assertEquals(maxReportedThreads, 100)
@Suppress("DEPRECATION")
assertEquals(launchCrashThresholdMs, 7000)
assertEquals(launchDurationMillis, 7000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ internal class ManifestConfigLoader {
private const val MAX_BREADCRUMBS = "$BUGSNAG_NS.MAX_BREADCRUMBS"
private const val MAX_PERSISTED_EVENTS = "$BUGSNAG_NS.MAX_PERSISTED_EVENTS"
private const val MAX_PERSISTED_SESSIONS = "$BUGSNAG_NS.MAX_PERSISTED_SESSIONS"
private const val MAX_REPORTED_THREADS = "$BUGSNAG_NS.MAX_REPORTED_THREADS"
private const val LAUNCH_CRASH_THRESHOLD_MS = "$BUGSNAG_NS.LAUNCH_CRASH_THRESHOLD_MS"
private const val LAUNCH_DURATION_MILLIS = "$BUGSNAG_NS.LAUNCH_DURATION_MILLIS"
private const val SEND_LAUNCH_CRASHES_SYNCHRONOUSLY = "$BUGSNAG_NS.SEND_LAUNCH_CRASHES_SYNCHRONOUSLY"
Expand Down Expand Up @@ -77,6 +78,7 @@ internal class ManifestConfigLoader {
maxBreadcrumbs = data.getInt(MAX_BREADCRUMBS, maxBreadcrumbs)
maxPersistedEvents = data.getInt(MAX_PERSISTED_EVENTS, maxPersistedEvents)
maxPersistedSessions = data.getInt(MAX_PERSISTED_SESSIONS, maxPersistedSessions)
maxReportedThreads = data.getInt(MAX_REPORTED_THREADS, maxReportedThreads)
launchDurationMillis = data.getInt(
LAUNCH_CRASH_THRESHOLD_MS,
launchDurationMillis.toInt()
Expand Down