From 18ace1124bde3be999059f7846d1a9af6bc1e79b Mon Sep 17 00:00:00 2001 From: Ramiz Wachtler Date: Sun, 20 Oct 2024 17:14:17 +0200 Subject: [PATCH 1/3] ref(transport): Update rate-limit log level to WARN Log a warning if all items of the current envelope were rate-limited Fixes #4456 --- Sources/Sentry/SentryHttpTransport.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Sentry/SentryHttpTransport.m b/Sources/Sentry/SentryHttpTransport.m index d6ef77e9c7d..9630076eac0 100644 --- a/Sources/Sentry/SentryHttpTransport.m +++ b/Sources/Sentry/SentryHttpTransport.m @@ -124,7 +124,7 @@ - (void)sendEnvelope:(SentryEnvelope *)envelope envelope = [self.envelopeRateLimit removeRateLimitedItems:envelope]; if (envelope.items.count == 0) { - SENTRY_LOG_DEBUG(@"RateLimit is active for all envelope items."); + SENTRY_LOG_WARN(@"RateLimit is active for all envelope items."); return; } From f88da377430f72dd88caa70bb80de485fd180a5f Mon Sep 17 00:00:00 2001 From: Ramiz Wachtler Date: Mon, 21 Oct 2024 19:22:17 +0200 Subject: [PATCH 2/3] ref(transport): Log a warning when an envelope item is dropped --- Sources/Sentry/SentryHttpTransport.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Sentry/SentryHttpTransport.m b/Sources/Sentry/SentryHttpTransport.m index 9630076eac0..4c5a5defddb 100644 --- a/Sources/Sentry/SentryHttpTransport.m +++ b/Sources/Sentry/SentryHttpTransport.m @@ -232,6 +232,7 @@ - (SentryFlushResult)flush:(NSTimeInterval)timeout - (void)envelopeItemDropped:(SentryEnvelopeItem *)envelopeItem withCategory:(SentryDataCategory)dataCategory; { + SENTRY_LOG_WARN(@"Envelope item dropped due to exceeding rate limit. Category: %@", nameForSentryDataCategory(dataCategory)); [self recordLostEvent:dataCategory reason:kSentryDiscardReasonRateLimitBackoff]; [self recordLostSpans:envelopeItem reason:kSentryDiscardReasonRateLimitBackoff]; } From 6c3e79be3273ab57dbe03e12a1b509ffca48b80f Mon Sep 17 00:00:00 2001 From: Ramiz Wachtler Date: Wed, 23 Oct 2024 19:04:11 +0200 Subject: [PATCH 3/3] chore: update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b669b5b7dc..14dbce83628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Improvements + +- Log a warning when dropping envelopes due to rate-limiting (#4463) + ## 8.39.0-beta.1 ### Removal of Experimental API