refactor(analytics): Only plant DebugTree in debug builds (#4025)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-12-17 10:20:32 -06:00 committed by GitHub
parent 380de5edb0
commit 506cba254c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,15 @@ constructor(
.setBundleWithTraceEnabled(true)
.setBundleWithRumEnabled(true)
.build()
Timber.plant(DatadogTree(datadogLogger), CrashlyticsTree(), DebugTree())
buildList {
add(DatadogTree(datadogLogger))
add(CrashlyticsTree())
if (BuildConfig.DEBUG) {
add(DebugTree())
}
}
.forEach(Timber::plant)
// Initial consent state
updateAnalyticsConsent(analyticsPrefs.analyticsAllowed)