Skip to content

feat(android): [Logs and Metrics Enable Flags 4] Add Timber Logs opt-in - #5943

Draft
adinauer wants to merge 2 commits into
feat/logs-opt-in-julfrom
feat/logs-opt-in-timber
Draft

feat(android): [Logs and Metrics Enable Flags 4] Add Timber Logs opt-in#5943
adinauer wants to merge 2 commits into
feat/logs-opt-in-julfrom
feat/logs-opt-in-timber

Conversation

@adinauer

@adinauer adinauer commented Aug 12, 2026

Copy link
Copy Markdown
Member

PR Stack (Logs and Metrics Enable Flags)


📜 Description

Adds an enableLogs option to SentryTimberIntegration and SentryTimberTree, defaulting to false while preserving their existing JVM constructor signatures.

Adds SentryAndroidOptions.enableTimberLogs and the io.sentry.timber.logs.enabled manifest 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
  • Added tests for default-disabled and explicit opt-in behavior for auto-installed and manual Timber integrations and trees
  • Added regression coverage for independent event and breadcrumb capture

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Add the Logcat Logs opt-in before removing the aggregate core Logs flag.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

adinauer and others added 2 commits August 12, 2026 16:18
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>
@github-actions

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 4f677fb

@sentry

sentry Bot commented Aug 12, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.52.0 (1) release

⚙️ sentry-android Build Distribution Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant