Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

### Dependencies

- Bump Native SDK from v0.13.7 to v0.13.8 ([#5334](https://github.com/getsentry/sentry-java/pull/5334))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0138)
- [diff](https://github.com/getsentry/sentry-native/compare/0.13.7...0.13.8)
- Bump Native SDK from v0.13.7 to v0.13.9 ([#5334](https://github.com/getsentry/sentry-java/pull/5334), [#5362](https://github.com/getsentry/sentry-java/pull/5362))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0139)
- [diff](https://github.com/getsentry/sentry-native/compare/0.13.7...0.13.9)

## 8.40.0

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ quartz = { module = "org.quartz-scheduler:quartz", version = "2.3.0" }
reactor-core = { module = "io.projectreactor:reactor-core", version = "3.5.3" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
sentry-native-ndk = { module = "io.sentry:sentry-native-ndk", version = "0.13.8" }
sentry-native-ndk = { module = "io.sentry:sentry-native-ndk", version = "0.13.9" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Bumping sentry-native-ndk enables native structured logs by default. The Java SDK does not propagate its options.getLogs().isEnabled() setting, causing unintended log collection.
Severity: MEDIUM

Suggested Fix

In SentryNdk.java, when constructing NdkOptions, read the value from options.getLogs().isEnabled() and pass it to the native layer. This likely involves calling a setter on NdkOptions, such as sentry_options_set_enable_logs(options, enabled), to ensure the Java SDK's configuration is respected by the native SDK.

Prompt for AI Agent
Review 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: gradle/libs.versions.toml#L154

Potential issue: The update to `sentry-native-ndk` version `0.13.9` changes the default
behavior to enable native structured logs. The Java-to-native bridge in `SentryNdk.java`
does not pass the Java SDK's logging configuration (`options.getLogs().isEnabled()`,
which defaults to `false`) to the native layer's `NdkOptions`. As a result, for
applications using native code that calls Sentry's structured logging APIs, logs will be
sent to Sentry by default, even when the developer has not opted in via the Java SDK
options. This contradicts the Java SDK's default-off behavior for logging.

Did we get this right? 👍 / 👎 to inform future reviews.

servlet-api = { module = "javax.servlet:javax.servlet-api", version = "3.1.0" }
servlet-jakarta-api = { module = "jakarta.servlet:jakarta.servlet-api", version = "6.1.0" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
Expand Down
Loading