| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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>
|
Sorry, something went wrong.
📲 Install BuildsAndroid
|
Sorry, something went wrong.
Keep the integration-local enableLogs setting while removing the aggregate Logs configuration that no longer exists. Co-Authored-By: Claude <noreply@anthropic.com>
Performance metrics 🚀
|
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| if (options.isEnableLogs() != null) { | ||
| getLogs().setEnabled(options.isEnableLogs()); | ||
| } | ||
|
|
||
| if (options.isEnableMetrics() != null) { | ||
| getMetrics().setEnabled(options.isEnableMetrics()); | ||
| } |
There was a problem hiding this comment.
Bug: The logs.enabled configuration is now parsed but silently ignored, causing logs to be captured even when users have explicitly disabled them.
Severity: MEDIUM
To prevent this silent breaking change, either restore the functionality of the logs.enabled flag or add a prominent warning when this deprecated configuration is detected. This will inform users about the change in behavior and guide them on how to properly configure logging going forward, preventing unexpected data capture.
Prompt for AI AgentReview the code at the location below. A potential bug has been identified by an AI agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not valid. Location: sentry/src/main/java/io/sentry/SentryOptions.java#L3733-L3738 Potential issue: The `logs.enabled` configuration property is now parsed but silently ignored. The pull request removes the `enable` field from `SentryOptions.Logs` and the corresponding `options.getLogs().isEnabled()` checks in `SentryClient` and `LoggerApi.captureLog()`. As a result, users who have explicitly set `logs.enabled=false` in their configuration to disable logging will find that logs are now captured and sent as long as the SDK itself is enabled. This silent breaking change goes against explicit user configuration and can lead to unexpected data collection and network usage.
Also affects:
Did we get this right? 👍 / 👎 to inform future reviews.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM 👍
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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.
Stops applying the legacy external and Android manifest values while retaining their parsing/accessors and metadata key for migration warnings in the following PRs. Removes active legacy Logs configuration from 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?
📝 Checklist
🔮 Next steps
Add targeted warnings for legacy Android manifest, external, and Spring Boot Logs configuration.