Expand description
Captures native crashes as minidumps in a separate process and sends them to Sentry as attachments.
Add MinidumpIntegration to your ClientOptions. The integration
does all of its work inside sentry::init:
- In the app process it spawns a crash reporter process and keeps the handle for the life of the client.
- In the crash reporter process it never returns. It builds its own client from the same options, runs the minidump server, and exits.
let _guard = sentry::init(
sentry::ClientOptions::new()
.dsn("https://your-dsn@sentry.io/0")
.add_integration(
sentry_minidump::MinidumpIntegration::new()
.crashes_dir("/var/lib/my-app/crashes"),
),
);
// Only the app process reaches here.Code before sentry::init runs in both processes, because the crash
reporter re-executes the current binary. Build the integration and call
MinidumpIntegration::is_crash_reporter_process on it to skip work
that should run only in the app process.
Initialise the minidump integration once per process. It runs a single crash reporter for the whole process; there is no per-client isolation. Only the first initialization that has a DSN starts the reporter; later calls do nothing.
§Scope sync
Scope changes do not cross the process boundary on their own. Send them to the crash reporter through the integration:
sentry::with_integration(|minidump: &sentry_minidump::MinidumpIntegration, _| {
minidump.set_user(Some(user.clone()));
});§Platforms
sentry-minidump builds on Linux, macOS and Windows only.
Structs§
- Minidump
Integration - Captures native crashes as minidumps and sends them to Sentry.