Sentry’s Native SDK gets its own crash backend (and more)
The Sentry Native SDK for C and C++ builds on a long history of native crash handling at Sentry. Since 2018, applications using Breakpad or Crashpad have been able to upload minidumps to Sentry. Sentrypad followed in 2019 and added a familiar Sentry API with DSN setup, tags, and breadcrumbs on top of these crash handlers. It later became the Native SDK, the foundation for handling native crashes in many other Sentry SDKs, such as Android, .NET, Unity, Unreal Engine, Godot, and Flutter.
We’re now preparing the Native SDK for a 1.0 release. Requirements from our gaming and console SDKs have driven much of the work leading up to it, and many of the features and improvements have already shipped in the 0.x series. Version 1.0 brings the remaining major changes, most notably a new default crash backend, and commits to the SDK’s stable features. After seven years of development, we’re finally ready to call it stable.
A crash backend that speaks Sentry
In 1.0, Sentry’s own “Native” crash backend replaces Google’s Crashpad as the default on desktop platforms. Like Crashpad, it uses an out-of-process crash handler, but the entire backend was built from the ground up with the Native SDK’s own building blocks.
Crashpad has been the default for years for good reason. It is a mature and widely used crash handler that runs independently in the background, which suits typical crash reporting well. Sentry, however, needs continuous coordination with the handler, as diagnostic context changes at runtime. That required a cross-platform IPC pipeline between the SDK and the Crashpad handler. Over the years, Sentry’s heavily customized Crashpad fork became a maintenance burden, and still wasn’t a great fit for many Sentry-specific scenarios.
The Native backend is different because it speaks Sentry. Its separate crash handler daemon uses the SDK’s own events, envelopes, attachments, hooks, and delivery infrastructure. Features built for Sentry can use that shared implementation. For example, screenshot capture can call the SDK’s before_screenshot hook, and crashes can be reported as a Sentry event, a minidump, or both.
The Native SDK has a comprehensive test suite, built up over the years to cover many platforms, configurations, and crash scenarios. The suite is now especially valuable for the new backend, and the results give us good confidence in the switch. Still, the backend has not had years to mature, so rare corner cases may behave differently than before. Reports of such cases are welcome.
Out-of-process crash handling on Xbox and Android
Sentry for Xbox, which builds on the Native SDK, has had to default to the Breakpad backend because getting Crashpad to run on Xbox turned out to be impractical. Breakpad works, but its crash handler runs inside the crashing process, and the crash report only reaches Sentry on the next launch.
That all changes with the Native backend. On Windows, instead of inspecting the crashed process itself, it lets the operating system write the minidump. Bringing the backend to Xbox took only a small change. Its crash handler runs in a separate process and sends the crash report at crash time. For now, the Native backend is opt-in on Xbox.
On Android, the current NDK integration has the same limitation. It handles native crashes inside the application process and saves the report for delivery when the application is launched again. On Android 12 and later, the report can be enriched with the tombstone that Android collects for the crash, but that also happens on the next launch. This means reporting depends on when (and whether) the user opens the application again.
Bringing the Native backend to Android started as a side experiment, mostly for fun. The first goal was to see what it would take to make the backend and its crash handler daemon compile for Android. Once that worked, the experiment grew into a fully functional port, with the crash handler running in a separate service process and sending the report at crash time.
The latest step was to add tombstone enrichment. On Android 12 and later, the service attaches the matching tombstone to the native crash event before sending it. The full report arrives right away, regardless of whether the application is opened again.
This is still a work in progress. The out-of-process handler will ship as an experimental, opt-in package for Android 11 and later, while the existing NDK integration remains the default.
Integrating Sentry with Windows Error Reporting
Unlike Crashpad, the Native backend lets Windows Error Reporting (WER) report the same crashes after Sentry has captured them. Existing WER workflows therefore keep working with the new default. The WER guide explains in more detail how Sentry and WER work together, including a WER compatibility comparison of all backends.
The Native SDK also has an optional WER integration that registers Sentry tags and attachments with WER. With the integration enabled, the Native backend captures the WER report ID in the Sentry event to link it to the matching WER report. As a result, Sentry and WER can be used together instead of one replacing the other.
More diagnostic context and more ways to deliver it
In the 0.x releases leading up to 1.0, the Native SDK has already shipped several major features.
- Scopes can now be created for a unit of work, such as a worker thread, subsystem, or connected client, and reused or cloned across captures. Events, logs, metrics, and user feedback can all be captured with a scope, and transactions and spans can be bound to it.
- HTTP retry uses exponential backoff to resend reports that failed because of network errors. This gives the reports another chance to reach Sentry when connectivity returns.
- Offline caching retains reports locally with configurable limits on count, age, and size.
- App-hang detection is experimental and uses a watchdog to capture the stack and diagnostic context of a chosen thread when it stops responding. The monitored thread must send heartbeats, and detection can be paused when monitoring would be inappropriate (such as while the application is in the background).
- Session Replay is experimental and links a video of the moments leading up to a crash to the crash event, with breadcrumbs on the replay timeline. Recording is currently supported by the Unreal Engine and Xbox SDKs.
- External crash reporters can collect user consent, feedback, and additional diagnostics before submitting the crash report. The Sentry Desktop Crash Reporter is available as a ready-made reference implementation for desktop platforms.
Copy less, share more
The new features did not come at the cost of performance. The Native SDK is now also faster at updating scope data, enriching events, and capturing logs and metrics. Many of the improvements were driven by the gaming and console SDKs, which often produce telemetry from many threads simultaneously.
Copy-on-write speeds up building events and telemetry from scope data, which can be large and deeply nested. Copies share the underlying data until one of them is modified. The cost of copying moves to the modification that needs it, and a callback that changes its copy still leaves the original untouched. As a result, many operations in the Native SDK no longer perform deep copies.
Read/write locks let many threads read scope data at the same time, while modifications get exclusive access. Readers take cheap copy-on-write snapshots under the read lock and can keep using them after it is released. For example, logs from Unreal Engine’s UE_LOG, which can arrive from more than 100 threads, are now enriched concurrently. In the benchmarks below, log capture from 32 threads is more than 20 times faster.
Other notable improvements include a shared telemetry worker pool, which serializes log and metric batches for the transport. The batchers stay free to accept incoming telemetry, even under heavy logging. In 1.0, the Native backend also synchronizes scope data with its crash handler daemon incrementally over IPC. Updating scope data with the Native backend is therefore much faster. In the tag benchmark below, the difference is more than tenfold.
Preparing for 1.0
Preparing the Native SDK for 1.0 has involved substantial refactoring and groundwork throughout 2026. Many issues have also been triaged and resolved, and the number of open issues has dropped below 50 for the first time since 2021.
Over the years, experimental APIs had grown to nearly a third of our public API. That called for an overdue review of experimental and deprecated APIs: deciding which features we’re ready to support as stable, which still need development, and which APIs should be retired.
You can prepare now by evaluating the Native backend. The migration guide and the changelog list the API changes, and the remaining work can be followed in the 1.0 pull request. Feedback is welcome before the final release.