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

Add option maxCacheSize #3521

Open
Tracked by #163
kahest opened this issue Jan 12, 2024 · 1 comment
Open
Tracked by #163

Add option maxCacheSize #3521

kahest opened this issue Jan 12, 2024 · 1 comment

Comments

@kahest
Copy link
Member

kahest commented Jan 12, 2024

Description

See getsentry/team-mobile#163.

SDKs with offline caching have the option maxCacheItems to specify the maximum number of envelopes to keep in the offline cache. Envelopes can significantly vary in size depending on which features our customers use. They can range from a couple of KBs up to MBs if, for example, screenshots are enabled.

As a mobile engineer, you mostly care about how much space the offline cache of Sentry SDKs will use on your user's devices. Therefore, we could add an option called maxCacheSize specifying the maximum size of bytes the offline cache can use until it has to delete envelopes. maxCacheSize and maxCacheItems should work together. Whenever the SDK stores an envelope to disk, it has to check if either maxCacheSize or maxCacheItems is reached, and if so, delete the oldest envelope.

What the default value for maxCacheSize should be is still being discussed.

@kahest kahest changed the title React-Native Add option maxCacheSize Jan 12, 2024
@kahest kahest transferred this issue from getsentry/team-mobile Jan 12, 2024
@krystofwoldrich
Copy link
Member

krystofwoldrich commented Jan 12, 2024

@krystofwoldrich krystofwoldrich self-assigned this Jan 12, 2024
@krystofwoldrich krystofwoldrich removed their assignment Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Blocked
Development

No branches or pull requests

2 participants