Skip to content

feat(core): [Logs and Metrics Enable Flags 7] Remove Logs enable flag - #5947

Merged
adinauer merged 7 commits into
feat/logs-metrics-enable-flagsfrom
feat/remove-logs-enable-flag
Oct 9, 2026
Merged

adinauer merged 7 commits into
feat/logs-metrics-enable-flagsfrom
feat/remove-logs-enable-flag

Conversation

@adinauer

@adinauer adinauer commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Logs and Metrics Enable Flags)


📜 Description

Removes SentryOptions.Logs.isEnabled and setEnabled and the aggregate Logs gate from LoggerApi. Manual Sentry.logger() calls now capture Logs whenever the SDK is enabled.

SentryClient now always creates the configured logger batch processor. Logback, Log4j2, JUL, Timber, and Logcat continue to require their integration-local opt-ins introduced earlier in this stack.

Removes the legacy external and Android manifest Logs configuration, along with active legacy Logs configuration in samples and test fixtures.

💡 Motivation and Context

The aggregate Logs flag duplicates integration-local controls and makes manual structured logging require an unnecessary global opt-in. Removing it gives Sentry.logger() the same direct capture semantics as other SDK APIs while local integration flags prevent unexpected automatic log forwarding.

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • ./gradlew :sentry:test :sentry-android-core:testReleaseUnitTest
  • ./gradlew :sentry-logback:test :sentry-log4j2:test :sentry-jul:test :sentry-android-timber:testReleaseUnitTest
  • ./gradlew :sentry-spring-boot:test :sentry-spring-boot-jakarta:test :sentry-spring-boot-4:test
  • Updated core and integration tests to verify capture without the aggregate option and continued local gating

📝 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

Avoid starting the Logs batch worker thread until it is first needed.

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

adinauer and others added 2 commits August 12, 2026 16:43
Capture manual Sentry Logs without an aggregate enable option and always create the configured logger batch processor. Keep automatic logging integrations controlled by their local opt-ins and remove legacy Logs configuration from active samples and fixtures.

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

github-actions Bot commented Aug 12, 2026 •

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 67e11cc

@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.58.0 (1) release

⚙️ sentry-android Build Distribution Settings

Keep the integration-local enableLogs setting while removing the aggregate Logs configuration that no longer exists.

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

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 318.02 ms 383.41 ms 65.39 ms
Size 0 B 0 B 0 B

Comment thread sentry/src/main/java/io/sentry/SentryOptions.java

@lbloder lbloder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍

adinauer and others added 3 commits September 29, 2026 16:04
Remove obsolete external and Android manifest parsing retained only for
migration warnings that will not ship in v9.

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

lbloder commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Do we still need NoOpLoggerBatchProcessor?

Base automatically changed from feat/logs-opt-in-spring-boot to feat/logs-metrics-enable-flags October 9, 2026 09:28
Remove the internal no-op batch processor now that SentryClient always
creates the configured Logs processor and no SDK path selects the stub.

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

adinauer commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

Removed NoOpLoggerBatchProcessor in 67e11cc. It had no remaining SDK call sites after removing the aggregate Logs enable flag; supported suppression remains available through beforeSendLog.

@adinauer
adinauer merged commit 3a3da5c into feat/logs-metrics-enable-flags Oct 9, 2026
63 of 65 checks passed
@adinauer
adinauer deleted the feat/remove-logs-enable-flag branch October 9, 2026 09:43
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