Skip to content

Commit 3c86175

Browse files
committed
Log a warning when items or whole envelope are dropped due to rate limiting
1 parent 95020ab commit 3c86175

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sentry/src/main/java/io/sentry/transport/RateLimiter.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ public RateLimiter(final @NotNull SentryOptions options) {
7575
if (dropItems != null) {
7676
options
7777
.getLogger()
78-
.log(SentryLevel.INFO, "%d items will be dropped due rate limiting.", dropItems.size());
78+
.log(
79+
SentryLevel.WARNING,
80+
"%d envelope items will be dropped due rate limiting.",
81+
dropItems.size());
7982

8083
// Need a new envelope
8184
List<SentryEnvelopeItem> toSend = new ArrayList<>();
@@ -87,7 +90,9 @@ public RateLimiter(final @NotNull SentryOptions options) {
8790

8891
// no reason to continue
8992
if (toSend.isEmpty()) {
90-
options.getLogger().log(SentryLevel.INFO, "Envelope discarded due all items rate limited.");
93+
options
94+
.getLogger()
95+
.log(SentryLevel.WARNING, "Envelope discarded due all items rate limited.");
9196

9297
markHintWhenSendingFailed(hint, false);
9398
return null;

0 commit comments

Comments
 (0)