Repository navigation
feat(develop-docs): Spec max_cache_size for offline caching - #20026
Draft
sentry-junior[bot] wants to merge 2 commits into
Draft
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…ling limits Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Cache Limits section to the offline caching spec. It defines
max_cache_size(a byte limit on the envelope cache) alongside the existingmax_cache_items, so SDKs can bound how much disk space the cache uses and not just how many envelopes it holds.Context: getsentry/sentry-java#3136 and getsentry/team-mobile#163 proposed
maxCacheSizebut left the default and edge cases open.What the spec covers:
max_cache_sizedefaults to 512 MiB. With onlymax_cache_items(30), the cache can grow to 30 envelopes of up to 200 MiB each (Relay's envelope limit, and sentry-cocoa's defaultmaxAttachmentSize). 512 MiB still fits one maximum-size envelope.0disables either limit, so users can rely on size only (or count only). If both are0, the cache is unbounded and SDKs should warn.cache_overflowclient report and moves the sessioninitflag, matching what sentry-java and sentry-cocoa do formaxCacheItemstoday.cache_overflowclient report.max_cache_items = 0from "cache nothing"/invalid to "no limit", and enabling the size limit by default, are behavior changes, so SDKs SHOULD ship them in a major version.Prior art: sentry-native already has
cache_max_items(30),cache_max_sizeandcache_max_age(both default0, off), where0disables a limit. sentry-unreal mapsCacheMaxItems = 0to unlimited on mobile. Today sentry-java and sentry-cocoa treatmaxCacheItems = 0as "cache nothing", and sentry-dotnet rejects it.Open questions: whether to also spec a
max_cache_age(sentry-native has one, sentry-cocoa hard-codes 90 days) and whether crash envelopes should be evicted last.via roman.
--
View Junior Session [Sentry]