FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ref(logging): [Logs and Metrics Enable Flags 21] Rename Logs opt-ins by adinauer · Pull Request #5970 · getsentry/sentry-java · GitHub

ref(logging): [Logs and Metrics Enable Flags 21] Rename Logs opt-ins - #5970

Draft
adinauer wants to merge 1 commit into
fix/visible-enable-flag-warningsfrom
ref/logs-enabled-naming
Draft

ref(logging): [Logs and Metrics Enable Flags 21] Rename Logs opt-ins#5970
adinauer wants to merge 1 commit into
fix/visible-enable-flag-warningsfrom
ref/logs-enabled-naming

Conversation

adinauer commented Aug 14, 2026
edited
Loading

Copy link
Copy Markdown
Member

PR Stack (Logs and Metrics Enable Flags)


📜 Description

Renames the generic logging-integration opt-in from enableLogs to logsEnabled before the new API is released:

  • Logback XML: <logsEnabled>true</logsEnabled>
  • Log4j2 plugin attribute: logsEnabled="true"
  • JUL LogManager: io.sentry.jul.SentryHandler.logsEnabled=true
  • Spring Boot: sentry.logging.logs-enabled=true
  • Timber constructors and property: logsEnabled
  • Android Timber option: timberLogsEnabled
  • Android Logcat option: logcatLogsEnabled

Java integrations expose state-oriented get...Enabled() and set...Enabled() accessors, which map to natural .logsEnabled, .timberLogsEnabled, and .logcatLogsEnabled property syntax in Kotlin. Samples, tests, API dumps, and option guidance use the renamed controls.

Legacy aggregate ExternalOptions.enableLogs detection remains unchanged because it exists only to warn about obsolete logs.enabled configuration. The Android manifest keys remain io.sentry.timber.logs.enabled and io.sentry.logcat.logs.enabled.

💡 Motivation and Context

logsEnabled describes state rather than an action and provides a consistent .logsEnabled property across Kotlin-native and Java-defined integrations.

💚 How did you test it?

  • ./gradlew :sentry-logback:test :sentry-log4j2:test :sentry-jul:test :sentry-android-timber:testReleaseUnitTest :sentry-android-core:testReleaseUnitTest :sentry-spring-boot:test :sentry-spring-boot-jakarta:test :sentry-spring-boot-4:test
  • ./gradlew spotlessApply apiDump

📝 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.

#skip-changelog

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

Use state-oriented names for the new Logback, Log4j2, JUL, Timber, Logcat, and Spring Boot Logs controls. Expose get...Enabled accessors so Java-defined options map to natural Kotlin properties before these APIs are released.

Co-Authored-By: Claude <noreply@anthropic.com>

sentry Bot commented Aug 14, 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

This was referenced Aug 14, 2026

runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes! Much better API

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL