sentry-cocoa
sentry-cocoa copied to clipboard
Add backpressure for SDK.capture methods
Description
A customer reported that they called SentrySDK.captureException in a tight loop to report failed HTTP requests, and the watchdog terminated their app due to OOM. Not only captureException, but also captureError, captureMessage are expensive operations that can cause trouble when being called in a tight loop. We can implement a backpressure mechanism to avoid apps being terminated by the watchdog.
This is related to https://github.com/getsentry/sentry-cocoa/issues/4038.