Class EventSizeLimitingUtils

java.lang.Object
io.sentry.util.EventSizeLimitingUtils

@Internal public final class EventSizeLimitingUtils extends Object
Utility class that limits event size to 1MB by incrementally dropping fields when the event exceeds the limit.
  • Method Details

    • limitEventSize

      @Nullable public static @Nullable SentryEvent limitEventSize(@NotNull @NotNull SentryEvent event, @NotNull @NotNull Hint hint, @NotNull @NotNull SentryOptions options)
      Limits the size of an event by incrementally dropping fields when it exceeds the limit.
      Parameters:
      event - the event to limit
      hint - the hint
      options - the SentryOptions
      Returns:
      the potentially reduced event