Commit c74a3d2
authored
fix(android): Properly remove duplicated breadcrumbs (#5841)
* fix(android): Properly remove duplicated breadcrumbs
This should fix duplicated breadcrumbs on Android.
- Sentry syncs breadcrumbs from JS and native
- In the past JS breadcrumbs was filtered out before sent to JS side
- This filter worked on iterator of native Scope and broke when Native Android SDK replaces raw Scope with some composite scope class which plays role of "view" to sevral downstream Scope objects
- This patch change filter to work on materialized breadcrumbs array just after serialization
* chore: use proper generic types
* chore: make linter happy as suggested
* chore: make linter even happier
* chore: finally fix java formatting
* chore: rewrite filtering algorithm to be more resilent to crashes
- use runtime type checks where possible without reducing perf
- use only features of java 8 so our tests can pass1 parent 4ff35e2 commit c74a3d2
File tree
1 file changed
+15
-11
lines changed- packages/core/android/src/main/java/io/sentry/react
1 file changed
+15
-11
lines changedLines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
866 | 864 | | |
867 | 865 | | |
868 | 866 | | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
876 | 881 | | |
877 | 882 | | |
| 883 | + | |
878 | 884 | | |
879 | 885 | | |
880 | | - | |
881 | | - | |
882 | 886 | | |
883 | 887 | | |
884 | 888 | | |
| |||
0 commit comments