Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(transport): Log a warning when dropping envelopes due to rate-limiting #4463

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/SentryHttpTransport.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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.");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case a pattern of "RateLimit [error-description]" has to be followed, that would be my alt suggestion: RateLimit is active for current envelope item, dropping...

[self recordLostEvent:dataCategory reason:kSentryDiscardReasonRateLimitBackoff];
[self recordLostSpans:envelopeItem reason:kSentryDiscardReasonRateLimitBackoff];
}
Expand Down
Loading