Skip to content

Commit 7eaf543

Browse files
mokagioclaude
andcommitted
Disable crash logging in debug builds
Now that the Sentry DSN is committed rather than decrypted, every build carries the production DSN — including local, contributor, and screenshot builds, which previously fell back to the dummy DSN in `gradle.properties-example`. `analyticsIsEnabled()` defaults to `true` when the preferences bucket is absent, so nothing else stopped a fresh contributor build from reporting into the production project. This matches `WPCrashLoggingDataProvider` and WooCommerce, which both keep debug builds out of Sentry. Prototype builds are `Debug`, so they stop reporting too — consistent with wpandroid, whose prototypes are already silenced the same way. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ff4aefa commit 7eaf543

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Simplenote/src/main/java/com/automattic/simplenote/utils/crashlogging/SimplenoteCrashLoggingDataProvider.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class SimplenoteCrashLoggingDataProvider @Inject constructor(
4545
get() = PerformanceMonitoringConfig.Disabled
4646

4747
override fun crashLoggingEnabled(): Boolean {
48+
if (BuildConfig.DEBUG) {
49+
return false
50+
}
51+
4852
return Simplenote.analyticsIsEnabled()
4953
}
5054

0 commit comments

Comments
 (0)