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

Change rate limiting logs to level warning or error #4456

Closed
Tracked by #4193 ...
philipphofmann opened this issue Oct 17, 2024 · 2 comments · Fixed by #4463
Closed
Tracked by #4193 ...

Change rate limiting logs to level warning or error #4456

philipphofmann opened this issue Oct 17, 2024 · 2 comments · Fixed by #4463

Comments

@philipphofmann
Copy link
Member

philipphofmann commented Oct 17, 2024

Description

See getsentry/team-mobile#195.

@rwachtler
Copy link
Contributor

rwachtler commented Oct 20, 2024

Hey @philipphofmann ! I was wondering if the goal is just to update the log-level here to something like SENTRY_LOG_WARN(@"RateLimit is active for all envelope items.") (as the title of this issue states) or also have some additional log statement, which isn't bound to the condition that all items has to be rate-limited in order to print the log?

I've the first variant ready in a fork, let me know if I should open a PR.

SentryHttpTransportTests
Image

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Oct 20, 2024
rwachtler added a commit to rwachtler/sentry-cocoa that referenced this issue Oct 20, 2024
Log a warning if all items of the current envelope were rate-limited

Fixes getsentry#4456
@philipphofmann
Copy link
Member Author

I think we should also log a warning here to communicate that one envelope item of the envelope was dropped.

/**
* SentryEnvelopeRateLimitDelegate.
*/
- (void)envelopeItemDropped:(SentryEnvelopeItem *)envelopeItem
withCategory:(SentryDataCategory)dataCategory;
{
[self recordLostEvent:dataCategory reason:kSentryDiscardReasonRateLimitBackoff];
[self recordLostSpans:envelopeItem reason:kSentryDiscardReasonRateLimitBackoff];
}

Yes, feel free to open a PR, @rwachtler. We will help you to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants