Conversation
Require an explicit Timber-local opt-in before forwarding Timber messages as Sentry Logs. Add Android options and manifest configuration for auto-installed integrations while preserving event and breadcrumb capture. Co-Authored-By: Claude <noreply@anthropic.com>
|
📲 Install BuildsAndroid
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4f677fb. Configure here.
| this.enableNetworkEventBreadcrumbs = enableNetworkEventBreadcrumbs; | ||
| } | ||
|
|
||
| public boolean isEnableTimberLogs() { |
There was a problem hiding this comment.
what do you think about naming this TimberLogCapture?
IMO, the current API isn't clear if we are outputting to Timber or capturing from Timber.
| public boolean isEnableTimberLogs() { | |
| public boolean setTimberLogCaptureEnabled() { |
| minEventLevel: SentryLevel = SentryLevel.ERROR, | ||
| minBreadcrumbLevel: SentryLevel = SentryLevel.INFO, | ||
| minLogsLevel: SentryLogLevel = SentryLogLevel.INFO, | ||
| enableLogs: Boolean? = true, |
There was a problem hiding this comment.
(l) we could default to enableLogs: Boolean? = null so all old tests use the old ctor. And only the specific logging tests could set true/false.
# Conflicts: # sentry-android-core/api/sentry-android-core.api

PR Stack (Logs and Metrics Enable Flags)
📜 Description
Adds a
logsEnabledoption toSentryTimberIntegrationandSentryTimberTree, defaulting tofalsewhile preserving their existing JVM constructor signatures.Adds
SentryAndroidOptions.timberLogsEnabledand theio.sentry.timber.logs.enabledmanifest key for auto-installed Timber integrations. Manually installed integrations and trees can opt in through their new constructor arguments.Timber forwarding requires both this local opt-in and the existing aggregate core Logs flag until that flag is removed later in the stack. Event and breadcrumb capture remain unchanged.
💡 Motivation and Context
Logging integrations need explicit local opt-ins before the aggregate core Logs flag can be removed. This keeps automatic Timber log forwarding disabled by default while allowing applications to opt in through Java, Kotlin, or Android manifest configuration.
💚 How did you test it?
./gradlew spotlessApply apiDump./gradlew :sentry-android-timber:testReleaseUnitTest :sentry-android-core:testReleaseUnitTest📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Add the Logcat Logs opt-in before removing the aggregate core Logs flag.