Use an Executor with a thread pool of max size 1 for sending HTTP requests
to Sentry. This thread pool will use 0 threads at idle, and reduce the
number of threads in use down to 0 after a minute of no exceptions.
Use a fixed queue for events. A queue of up to 50 events will be queued
for sending to Sentry. If more than 50 events are queued, the new events
will be discarded.
These two changes will add a fixed ceiling to the amount of resources the
Sentry client will use on the device.
Introduce 2 limits on the resources used.
Use an Executor with a thread pool of max size 1 for sending HTTP requests to Sentry. This thread pool will use 0 threads at idle, and reduce the number of threads in use down to 0 after a minute of no exceptions.
Use a fixed queue for events. A queue of up to 50 events will be queued for sending to Sentry. If more than 50 events are queued, the new events will be discarded.
These two changes will add a fixed ceiling to the amount of resources the Sentry client will use on the device.