Skip to content

Commit

Permalink
fix(android): Pass sampleRate option to the Android SDK (#3979)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Jul 31, 2024
1 parent c74b4c2 commit a5a8f89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixes

- Pass `sampleRate` option to the Android SDK ([#3979](https://github.com/getsentry/sentry-react-native/pull/3979))
- Drop app start data older than one minute ([#3974](https://github.com/getsentry/sentry-react-native/pull/3974))

### Dependencies
Expand Down
3 changes: 3 additions & 0 deletions android/src/main/java/io/sentry/react/RNSentryModuleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
// SentryAndroid needs an empty string fallback for the dsn.
options.setDsn("");
}
if (rnOptions.hasKey("sampleRate")) {
options.setSampleRate(rnOptions.getDouble("sampleRate"));
}
if (rnOptions.hasKey("sendClientReports")) {
options.setSendClientReports(rnOptions.getBoolean("sendClientReports"));
}
Expand Down

0 comments on commit a5a8f89

Please sign in to comment.