-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cached envelope data from dead process for native crash (#1760)
## Goal For native crashes, try to use the envelope resource/metadata from the associated session to reflect the app/SDK state when the crash happened. If a session is not found, use the cached crash envelope that is written when there are no sessions to get the envelope data. Failing that, use the current SDK's envelope, but log an internal error. This is done through using a new component, `CachedLogEnvelopeStore`, that will be be used by the `PayloadResurrectionService` to create and cache the appropriate envelope for a native crash, and then by `LogEnvelopeSource` to consume the envelope. The workflow goes thusly: 1. Session resurrection: create and cache envelope for native crash associated with a resurrected session 2. Native crash log creation: get envelope for the given crash's `StoredTelemetryMetadata` 3. Left over native crashes (only expect 1) will use the resource and metadata off the cached crash envelope to produce the envelope for it the crash. 4. Send session-less crash 5. Clean up any left over native crashes and envelopes ## Testing Unit and integration tests added to verify the case where a session is found, where a session isn't found but the cached crash envelope exists, as well as when neither are there.
- Loading branch information
Showing
39 changed files
with
923 additions
and
143 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.