File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sentry/src/main/java/io/sentry/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2323public final class EventSizeLimitingUtils {
2424
2525 private static final long MAX_EVENT_SIZE_BYTES = 1024 * 1024 ;
26- private static final int FRAMES_PER_SIDE = 250 ;
26+ private static final int MAX_FRAMES_PER_STACK = 500 ;
2727
2828 private EventSizeLimitingUtils () {}
2929
@@ -113,7 +113,7 @@ private static boolean isSizeOk(
113113
114114 private static @ NotNull SentryEvent removeAllBreadcrumbs (
115115 final @ NotNull SentryEvent event , final @ NotNull SentryOptions options ) {
116- final List <Breadcrumb > breadcrumbs = event .getBreadcrumbs ();
116+ final @ Nullable List <Breadcrumb > breadcrumbs = event .getBreadcrumbs ();
117117 if (breadcrumbs != null && !breadcrumbs .isEmpty ()) {
118118 event .setBreadcrumbs (null );
119119 options
@@ -157,7 +157,7 @@ private static boolean isSizeOk(
157157 if (stacktrace != null ) {
158158 final @ Nullable List <SentryStackFrame > frames = stacktrace .getFrames ();
159159 if (frames != null && frames .size () > (FRAMES_PER_SIDE * 2 )) {
160- final @ NotNull List <SentryStackFrame > truncatedFrames = new ArrayList <>();
160+ final @ NotNull List <SentryStackFrame > truncatedFrames = new ArrayList <>(FRAMES_PER_SIDE * 2 );
161161 truncatedFrames .addAll (frames .subList (0 , FRAMES_PER_SIDE ));
162162 truncatedFrames .addAll (frames .subList (frames .size () - FRAMES_PER_SIDE , frames .size ()));
163163 stacktrace .setFrames (truncatedFrames );
You can’t perform that action at this time.
0 commit comments