Class RateLimiter

java.lang.Object
io.sentry.transport.RateLimiter

public final class RateLimiter extends Object
Controls retry limits on different category types sent to Sentry.
  • Constructor Details

  • Method Details

    • filter

      @Nullable public @Nullable SentryEnvelope filter(@NotNull @NotNull SentryEnvelope envelope, @NotNull @NotNull Hint hint)
    • isActiveForCategory

      public boolean isActiveForCategory(@NotNull @NotNull DataCategory dataCategory)
    • isAnyRateLimitActive

      public boolean isAnyRateLimitActive()
    • updateRetryAfterLimits

      public void updateRetryAfterLimits(@Nullable @Nullable String sentryRateLimitHeader, @Nullable @Nullable String retryAfterHeader, int errorCode)
      Reads and update the rate limit Dictionary
      Parameters:
      sentryRateLimitHeader - the sentry rate limit header
      retryAfterHeader - the retry after header
      errorCode - the error code if set