Skip to content

Instantly share code, notes, and snippets.

@Titozzz
Created October 11, 2019 16:01
Show Gist options
  • Save Titozzz/837da990bcc0ec9f43cc272b10288671 to your computer and use it in GitHub Desktop.
Save Titozzz/837da990bcc0ec9f43cc272b10288671 to your computer and use it in GitHub Desktop.
+diff --git a/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java b/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java
index 5a05c2d..e9b53f9 100644
--- a/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java
+++ b/node_modules/@sentry/react-native/android/src/main/java/io/sentry/RNSentryModule.java
@@ -187,7 +187,17 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
}
if (breadcrumb.hasKey("type")) {
- breadcrumbBuilder.setType(breadcrumb.getString("type"));
+ String breadcrumbType = breadcrumb.getString("type");
+
+ if (Breadcrumb.Type.HTTP.getValue().equals(breadcrumbType)) {
+ breadcrumbBuilder.setType(Breadcrumb.Type.HTTP);
+ } else if (Breadcrumb.Type.NAVIGATION.getValue().equals(breadcrumbType)) {
+ breadcrumbBuilder.setType(Breadcrumb.Type.NAVIGATION);
+ } else if (Breadcrumb.Type.USER.getValue().equals(breadcrumbType)) {
+ breadcrumbBuilder.setType(Breadcrumb.Type.USER);
+ } else {
+ breadcrumbBuilder.setType(Breadcrumb.Type.DEFAULT);
+ }
}
try {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment