feat(spring): [Logs and Metrics Enable Flags 6] Add logging Logs opt-in - #5946
Draft
adinauer wants to merge 2 commits into
Draft
feat(spring): [Logs and Metrics Enable Flags 6] Add logging Logs opt-in#5946adinauer wants to merge 2 commits into
adinauer wants to merge 2 commits into
Conversation
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>
This was referenced Aug 12, 2026
Contributor
|
📲 Install BuildsAndroid
|
This was referenced Aug 12, 2026
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
SentryProperties.Logging.enableLogs, defaulting tofalse, to all three Spring Boot integrations and binds it assentry.logging.enable-logs.Each auto-configured Logback appender receives the property. The broader
sentry.logging.enabledproperty 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.enabledproperty, 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📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Remove the aggregate core Logs enable flag and migrate remaining samples and fixtures.