getsentry / getsentry/sentry-react-native

Add option maxCacheSize

Aperta
#3,521 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Blocked Errors Feature React-Native
Lingua principale
TypeScript
Stelle
1.8k
Fork
366
Merge medio
1g 5h
PR unite (30g)
93

Descrizione

### Description
See https://github.com/getsentry/team-mobile/issues/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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo l’implementazione di offline-cache e la issue team-mobile collegata relativa al valore predefinito ancora irrisolto. Verifica come vengono archiviati e rimossi gli envelope, quindi definisci il completamento imponendo sia maxCacheSize sia maxCacheItems, eliminando l’envelope più vecchio quando viene raggiunto uno dei due limiti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react-native, typescript
Ambito
mobile
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.