File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed
Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1010
1111### Improvements
1212
13+ - Expose `MAX_EVENT_SIZE_BYTES` constant in SentryOptions ([#4962](https://github.com/getsentry/sentry-java/pull/4962))
1314- Discard envelopes on `4xx` and `5xx` response ([#4950](https://github.com/getsentry/sentry-java/pull/4950))
1415 - This aims to not overwhelm Sentry after an outage or load shedding (including HTTP 429) where too many events are sent at once
1516
Original file line number Diff line number Diff line change @@ -3341,6 +3341,7 @@ public final class io/sentry/SentryOpenTelemetryMode : java/lang/Enum {
33413341
33423342public class io/sentry/SentryOptions {
33433343 public static final field DEFAULT_PROPAGATION_TARGETS Ljava/lang/String;
3344+ public static final field MAX_EVENT_SIZE_BYTES J
33443345 protected final field lock Lio/sentry/util/AutoClosableReentrantLock;
33453346 public fun <init> ()V
33463347 public fun addBundleId (Ljava/lang/String;)V
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ public class SentryOptions {
5656
5757 @ ApiStatus .Internal public static final @ NotNull String DEFAULT_PROPAGATION_TARGETS = ".*" ;
5858
59+ /** Maximum size of an event in bytes. Events exceeding this limit will be reduced. */
60+ public static final long MAX_EVENT_SIZE_BYTES = 1024 * 1024 ;
61+
5962 /** Default Log level if not specified Default is DEBUG */
6063 static final SentryLevel DEFAULT_DIAGNOSTIC_LEVEL = SentryLevel .DEBUG ;
6164
Original file line number Diff line number Diff line change 11package io .sentry .util ;
22
3+ import static io .sentry .SentryOptions .MAX_EVENT_SIZE_BYTES ;
4+
35import io .sentry .Breadcrumb ;
46import io .sentry .Hint ;
57import io .sentry .SentryEvent ;
2224@ ApiStatus .Internal
2325public final class EventSizeLimitingUtils {
2426
25- private static final long MAX_EVENT_SIZE_BYTES = 1024 * 1024 ;
2627 private static final int MAX_FRAMES_PER_STACK = 500 ;
2728 private static final int FRAMES_PER_SIDE = MAX_FRAMES_PER_STACK / 2 ;
2829
You can’t perform that action at this time.
0 commit comments