Package io.sentry.transport
Class RateLimiter
java.lang.Object
io.sentry.transport.RateLimiter
Controls retry limits on different category types sent to Sentry.
-
Constructor Summary
ConstructorDescriptionRateLimiter
(@NotNull SentryOptions options) RateLimiter
(@NotNull ICurrentDateProvider currentDateProvider, @NotNull SentryOptions options) -
Method Summary
Modifier and TypeMethodDescription@Nullable SentryEnvelope
filter
(@NotNull SentryEnvelope envelope, @NotNull Hint hint) boolean
isActiveForCategory
(@NotNull DataCategory dataCategory) boolean
void
updateRetryAfterLimits
(@Nullable String sentryRateLimitHeader, @Nullable String retryAfterHeader, int errorCode) Reads and update the rate limit Dictionary
-
Constructor Details
-
RateLimiter
public RateLimiter(@NotNull @NotNull ICurrentDateProvider currentDateProvider, @NotNull @NotNull SentryOptions options) -
RateLimiter
-
-
Method Details
-
filter
@Nullable public @Nullable SentryEnvelope filter(@NotNull @NotNull SentryEnvelope envelope, @NotNull @NotNull Hint hint) -
isActiveForCategory
-
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 headerretryAfterHeader
- the retry after headererrorCode
- the error code if set
-