feat: Parse minidump crashpad metadata #1095
Draft
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.
This PR adds parsing to pull annotations from the crashpad stream in the loaded minidumps and include them in the event context.
Electron includes additional v8 context in the crashpad metadata (like
electron.v8-oom.detail
which gives details about the OOM reason):https://github.com/electron/electron/blob/d987bee0073310c0bf114dd5e5c9db5e9c68ee59/shell/common/node_bindings.cc#L193
This PR reads that data from the minidump and includes it in the
electron
context and prepends the keys withcrashpad.
. This allows users to use this info inbeforeSend
filters and in other sampling decisions.The parser code was mostly aided by the
rust-minidump
crate which has great documentation but I've credited it fully in the source because it would have been a lot more complicated without such a comprehensive library to test against.I still want to add: