Skip to content
Open
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 @@ -26,9 +26,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.14.0 ([#5334](https://github.com/getsentry/sentry-java/pull/5334), [#5365](https://github.com/getsentry/sentry-java/pull/5365))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0140)
- [diff](https://github.com/getsentry/sentry-native/compare/0.13.7...0.14.0)

## 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.14.0" }
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: The native layer does not respect the Java SDK's options.getMetrics().setEnabled(false) setting, causing metrics to be sent even when disabled.
Severity: MEDIUM

Suggested Fix

Update the SentryNdk.init() method to read the options.getMetrics().isEnabled() value from the Java options. Pass this boolean to the native layer during its initialization to ensure the native SDK's metrics configuration is synchronized with the Java SDK's setting.

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 Java SDK does not propagate the metrics enabled/disabled setting to
the native (NDK) layer. With the update to `sentry-native` SDK v0.14.0, which enables
metrics by default, users who disable metrics in the Java SDK via
`options.getMetrics().setEnabled(false)` will still have the native layer sending them.
The `SentryNdk.init()` method does not pass the Java-level setting to the `NdkOptions`,
causing the user's configuration to be ignored for native events.

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