feat(android): [Logs and Metrics Enable Flags 5] Add Logcat Logs opt-in - #5945
Open
adinauer wants to merge 2 commits into
Open
feat(android): [Logs and Metrics Enable Flags 5] Add Logcat Logs opt-in#5945adinauer wants to merge 2 commits into
adinauer wants to merge 2 commits into
Conversation
Require an explicit Android option before forwarding Logcat calls as Sentry Logs. Support Java and manifest configuration while keeping breadcrumbs and Android Log calls unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
This was referenced Aug 12, 2026
📲 Install BuildsAndroid
|
8 tasks
Contributor
Performance metrics 🚀
|
This was referenced Aug 12, 2026
adinauer
marked this pull request as ready for review
August 13, 2026 13:40
adinauer
requested review from
0xadam-brown,
markushi,
romtsn and
runningcode
as code owners
August 13, 2026 13:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Logs and Metrics Enable Flags)
📜 Description
Adds
SentryAndroidOptions.enableLogcatLogs, defaulting tofalse, and theio.sentry.logcat.logs.enabledAndroid manifest key.SentryLogcatAdapternow requires both this local opt-in and the existing aggregate core Logs flag before forwarding Logcat calls as Sentry Logs. The local check runs before throwable and message processing. Breadcrumb creation and the original AndroidLoginvocation remain unchanged.💡 Motivation and Context
Automatic Logcat instrumentation needs an explicit local opt-in before the aggregate core Logs flag can be removed. This prevents instrumented Android applications from unexpectedly forwarding Logcat output when core Logs capture becomes available without a global enable flag.
💚 How did you test it?
./gradlew spotlessApply apiDump./gradlew :sentry-android-core:testReleaseUnitTest📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Add the Spring Boot Logback opt-in before removing the aggregate core Logs flag.