getsentry / getsentry/sentry-dotnet

Support opt-in crashpad (out-of-proc) for native crash handling in AOT applications

Open
#4,867 2 comments 0 reactions 0 assignees View on GitHub
.NET Feature State: Needs Discussion
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

### Problem Statement

The .NET SDK's native crash integration uses `SENTRY_BACKEND=inproc`, which has limitations in containerized/ephemeral environments (e.g., Kubernetes).

When a native crash occurs (SIGSEGV, etc.), the in-process handler may not capture and send the crash before the process terminates. This is especially problematic when:
- Containers have no persistent storage (no PVC)
- The orchestrator terminates pods quickly after a crash
- There's no opportunity for crash-on-restart recovery

Currently, users must disable the SDK's native integration (`false`) and manually configure crashpad with their own watchdog process to reliably capture native crashes.

### Solution Brainstorm

1. **Opt-in crashpad package:** Bundle crashpad (out-of-proc crash handling) as a separate opt-in NuGet package. This would allow users in containerized environments to get reliable native crash capture without manual setup.

2. **Documentation improvements:** Document the current `inproc` limitations and the `false` opt-out for users who need to manage native crash handling themselves.

3. **Configuration options:** Expose options to configure the native crash handler backend (inproc vs crashpad) for advanced use cases.

Context: This request comes from a customer successfully running AOT-compiled .NET 10 apps in Kubernetes who had to implement their own crashpad wrapper to get reliable native crash capture with proper managed + native stack traces.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.