Skip to content

feat(spring): [Logs and Metrics Enable Flags 6] Add logging Logs opt-in - #5946

Draft
adinauer wants to merge 2 commits into
feat/logs-opt-in-logcatfrom
feat/logs-opt-in-spring-boot
Draft

feat(spring): [Logs and Metrics Enable Flags 6] Add logging Logs opt-in#5946
adinauer wants to merge 2 commits into
feat/logs-opt-in-logcatfrom
feat/logs-opt-in-spring-boot

Conversation

@adinauer

@adinauer adinauer commented Aug 12, 2026

Copy link
Copy Markdown
Member

PR Stack (Logs and Metrics Enable Flags)


📜 Description

Adds SentryProperties.Logging.enableLogs, defaulting to false, to all three Spring Boot integrations and binds it as sentry.logging.enable-logs.

Each auto-configured Logback appender receives the property. The broader sentry.logging.enabled property continues to control whether the appender is installed, while event and breadcrumb levels remain independent from Sentry Logs forwarding.

Spring Boot samples now set the new local opt-in alongside the existing aggregate sentry.logs.enabled property, which remains required until it is removed later in this stack.

💡 Motivation and Context

Auto-configured Logback appenders need the same explicit local Logs opt-in as manually configured Logback appenders. This prevents Spring Boot applications from unexpectedly forwarding framework logs after the aggregate core Logs flag is removed.

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • ./gradlew :sentry-spring-boot:test :sentry-spring-boot-jakarta:test :sentry-spring-boot-4:test
  • Added property binding and appender propagation tests for all three Spring Boot variants
  • Verified the appender remains installed with Logs disabled by default

📝 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

Remove the aggregate core Logs enable flag and migrate remaining samples and fixtures.

⚠️ 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:34
Add a Spring Boot logging property that controls Sentry Logs forwarding from auto-configured Logback appenders. Keep appender installation, events, and breadcrumbs independent from the new opt-in.

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 381242f

@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