Skip to content

Commit 840f41d

Browse files
feat(native): add crashpad-wait-for-upload option (#13117)
* add crashpad-wait-for-upload option * edit backend tradeoffs for crashpad * apply suggestion Co-authored-by: Mischan Toosarani-Hausberger <[email protected]> --------- Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
1 parent b5e359c commit 840f41d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ Sentry decided on `crashpad` as the default on all platforms because there are a
3232
* you cannot package or deploy an additional executable (the `crashpad_handler`)
3333
* you cannot allow a secondary process to connect via `ptrace` to your application (AWS Lambda, Flatpak-, Snap-Sandboxes)
3434
* IPC between your process and the `crashpad_handler` is inhibited by security settings or not available in your deployment target
35-
* your deployment scenario cannot wait for the `crashpad_handler` to finish its work before a shutdown-after-crash (systemd, Docker)
3635
* you want to distribute your application via the macOS App Store
3736
* you want to define crash hooks on macOS because there, error handling happens entirely in the `crashpad_handler`, whereas on Linux and Windows, at least the initial handling happens in your process, after which `crashpad_handler` takes over and snapshots the process to send a crash report
3837

3938
In the above cases, if you cannot loosen the requirements of your environment, you have to choose an in-process backend (meaning either `breakpad` or `inproc`).
4039

40+
When your deployment scenario should wait for the `crashpad_handler` to finish its work before a shutdown-after-crash (systemd, Docker), you can enable the option [`crashpad_wait_for_upload`](/platforms/native/configuration/options/#crashpad-wait-for-upload) to delay application shutdown until the upload of the crash report is completed.
41+
4142
### How do I decide between `breakpad` or `inproc`?
4243

4344
Both backends are comparable in how they differ from `crashpad`. However, there are also considerable differences between the two:

docs/platforms/native/common/configuration/options.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ This variable controls the total amount of breadcrumbs that should be captured.
6060

6161
</ConfigKey>
6262

63+
<ConfigKey name="crashpad-wait-for-upload">
64+
65+
Whether Crashpad should delay application shutdown until the upload of the crash report in the `crashpad_handler` is complete. This is useful for deployment in `Docker` or `systemd`, where the life cycle of additional processes is bound by the application life cycle.
66+
67+
</ConfigKey>
68+
6369
## Hooks
6470

6571
These options can be used to hook the SDK in various ways to customize the reporting of events.

0 commit comments

Comments
 (0)