Repository navigation
ref(core): Inject the envelope disk cache from SentryRuntime - #6833
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
The SentryClient, its transport, and the previous-session tasks now get the envelope disk cache through their constructors instead of reading it off SentryOptions. The runtime creates the default cache, and Android puts its AndroidEnvelopeCache on the runtime builder. The public constructors that read the cache off the options keep working. Part of JAVA-817 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Contributor
PR risk: mediumFor commit Main concerns: reach, public contract, host performance. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
This branch has not been 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.
📜 Description
The envelope disk cache now reaches its users through constructors instead of
SentryOptions.getEnvelopeDiskCache().SentryClient(options),AsyncHttpTransportFactory()and bothAsyncHttpTransportconstructors stay and read the cache off the options, as before.SentryOptions.setEnvelopeDiskCachestill wins over the default, andgetEnvelopeDiskCache()returns the runtime's cache.InternalSentrySdk.updateSessionNonTerminatingreads the cache from the current runtime.PreviousSessionFinalizeralso takes the serializer. It's the same constructor, andruntime.getSerializer()is lazy, so theJsonSerializerstill isn't created on the init thread.💡 Motivation and Context
Part of JAVA-817. Stacked on #6830.
💚 How did you test it?
The updated
MovePreviousSessionTest,PreviousSessionFinalizerTestandAndroidOptionsInitializerTest.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Retarget to
mainonce #6830 merges. This conflicts with the init-time executor PR on theinitializeIntegrationsAndProcessorssignature; whichever merges second rebases.🤖 Generated with Claude Code
#skip-changelog