From 18ace1124bde3be999059f7846d1a9af6bc1e79b Mon Sep 17 00:00:00 2001 From: Ramiz Wachtler Date: Sun, 20 Oct 2024 17:14:17 +0200 Subject: [PATCH 1/2] 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 d6ef77e9c7..9630076eac 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 1e206e58a449a963f4abd87ffa529adec334c432 Mon Sep 17 00:00:00 2001 From: Ramiz Wachtler Date: Mon, 21 Oct 2024 19:22:17 +0200 Subject: [PATCH 2/2] ref(transport): Log a warning when an envelope item is dropped --- Brewfile.lock.json | 26 +++++++++++++------------- Sources/Sentry/SentryHttpTransport.m | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Brewfile.lock.json b/Brewfile.lock.json index ca8b73ac01..261368a5ba 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,40 +2,40 @@ "entries": { "brew": { "clang-format": { - "version": "19.1.1", + "version": "19.1.2", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_sequoia": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:7b5f8c066c04e831f51f2abf16312084e3fa098b0ff76abc6480967a2860bd24", - "sha256": "7b5f8c066c04e831f51f2abf16312084e3fa098b0ff76abc6480967a2860bd24" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:a82f16350cfeed607e80cc9d877d78c0cb6d465e0a66a47a6e39c159668c789a", + "sha256": "a82f16350cfeed607e80cc9d877d78c0cb6d465e0a66a47a6e39c159668c789a" }, "arm64_sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:e7ba64f5fba3cf0ceadaa3c520a2208642ce1169bffac8db1e9b56569195148e", - "sha256": "e7ba64f5fba3cf0ceadaa3c520a2208642ce1169bffac8db1e9b56569195148e" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:4b12390472ef6e79e34ba8f38e9d42fabf89fcc8cffc17859ad596b24515bbb3", + "sha256": "4b12390472ef6e79e34ba8f38e9d42fabf89fcc8cffc17859ad596b24515bbb3" }, "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:ce317db950e3d268110f2bc62c5f1aa07cbb50dafd2603e168e363718a9d9e21", - "sha256": "ce317db950e3d268110f2bc62c5f1aa07cbb50dafd2603e168e363718a9d9e21" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:8977195e29109568ba0967f54a7f80e496805aa1f3f9ed690457c98eec2c1068", + "sha256": "8977195e29109568ba0967f54a7f80e496805aa1f3f9ed690457c98eec2c1068" }, "sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:43bcbde28012da49f5679bec7ba8d2c341771cee9909bddde1ec2e29e1fd8320", - "sha256": "43bcbde28012da49f5679bec7ba8d2c341771cee9909bddde1ec2e29e1fd8320" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:3b6ed940cbf758275731110797922ee915037742ba1bfeac4c5c0501d300b648", + "sha256": "3b6ed940cbf758275731110797922ee915037742ba1bfeac4c5c0501d300b648" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:80ac7aac07528efb14db1928d1268db16033dcbaf73a0fa5c1d08817d3bf3ab4", - "sha256": "80ac7aac07528efb14db1928d1268db16033dcbaf73a0fa5c1d08817d3bf3ab4" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:2a4da6a96d32df130b204f9a07cc504311ea3772f2aba7178180e19894abcea2", + "sha256": "2a4da6a96d32df130b204f9a07cc504311ea3772f2aba7178180e19894abcea2" }, "x86_64_linux": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:f8318eea6c50bf91462397af31ee5c20413dfb1a6625aa8b73d524f4b7396180", - "sha256": "f8318eea6c50bf91462397af31ee5c20413dfb1a6625aa8b73d524f4b7396180" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:01276175af2b9b465e19581432350f2e47293e9d2ff7b61488d414330bb30129", + "sha256": "01276175af2b9b465e19581432350f2e47293e9d2ff7b61488d414330bb30129" } } } diff --git a/Sources/Sentry/SentryHttpTransport.m b/Sources/Sentry/SentryHttpTransport.m index 9630076eac..574992e50d 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."); [self recordLostEvent:dataCategory reason:kSentryDiscardReasonRateLimitBackoff]; [self recordLostSpans:envelopeItem reason:kSentryDiscardReasonRateLimitBackoff]; }