
Sentry Native
https://github.com/getsentry/sentry-native- Category
- Developer Tools
- Rank
- No. 377Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- getsentry
- GitHub
- 570 stars
- Latest release
- 0.16.5
- Date
About
Sentry SDK for C, C++, and native applications. Crash reporting via Breakpad and Crashpad with cross-platform support.
What it does
Sentry Native embeds diagnostics collection inside compiled applications. It records failures alongside tags, breadcrumbs, attachments, and custom context, then packages data for delivery to Sentry. Its runtime also manages local report storage, pending uploads, session tracking, consent checks, telemetry, and optional application hang monitoring.
Why it's ranked here
The engineering scope is substantial: rich event context, configurable transport, local recovery of unsent data, and tested coverage across major desktop and mobile targets. The decisive caveat is product posture. Standalone use remains experimental, receives best-effort support, and is secondary to powering other Sentry SDKs.
What's good
It handles more than fatal failures. Applications can attach files or bytes, preserve breadcrumbs, add tags and context, track sessions, and monitor hangs. Reports can survive locally for later processing. Build choices include static or shared libraries, cross-compilation, Android integration, and user-supplied transport where built-in HTTP support is unavailable.
Tradeoffs
Platform capability is uneven. Built-in HTTP needs Windows or curl, while Crashpad and client-side stack walking are limited to Linux, Windows, and macOS. Crashpad adds zlib, and Linux or macOS builds require curl. Breakpad and Crashpad require a C++17 compiler. Older Windows targets are not automatically tested, and MinGW support is restricted.
How to use it well
Choose it when a native application needs detailed Sentry-bound failure evidence and the team can own build integration, symbols, dependencies, and platform-specific validation. Prefer release packages and test the selected backend on every target. It does not replace the Sentry service that receives reports, and standalone adopters should not expect guaranteed feature support.
Technical notes+
README.md describes a CMake project that can produce shared or static libraries, cross-compile, install system-wide, and expose an Android JNI layer through ndk. Makefile defines separate C unit, Python integration, leak, benchmark, formatting, and style workflows under tests. src/sentry_core.c coordinates global options, consent, local run storage, backend startup, old-run processing, sessions, telemetry, and hang monitoring. src/sentry_os.c contains Windows abort interception, version discovery, dynamically resolved kernel functions, and thread stack guarantees; src/sentry_os.h extracts Linux instruction and stack pointers across x86, x64, ARM, and ARM64. src/sentry_elf.h validates ELF structure sizes and safely scans aligned note buffers. src/sentry_json.c implements bounded-depth JSON writing and parsing, while src/sentry_hint.c supports file and memory attachments.
Observed
- Interface
- Embeddable C and C++ client library with an Android Java JNI layer.
- Build and installation
- Shipped as a CMake project with release packages, system-wide installation, and static or shared library builds.
- Package surfaces
- Repository badges identify Conan Center, Homebrew, nixpkgs, and vcpkg availability.
- Tested platforms
- Test matrix covers Linux, Windows, macOS, and Android across x86, x64, ARM, and ARM64 variants.
- Transport support
- Built-in HTTP uses WinHTTP on Windows or curl where available; callers can provide their own transport elsewhere.
- Test structure
- The Makefile exposes C unit tests, Python integration tests, leak checks, and benchmarks.
Read from README.md, Makefile, src/sentry_os.c, src/sentry_os.h, src/sentry_elf.h, src/sentry_boot.h, src/sentry_core.c, src/sentry_core.h, src/sentry_hint.c, src/sentry_hint.h, src/sentry_info.c, src/sentry_json.c, src/sentry_json.h, src/sentry_logs.c, src/sentry_logs.h.
What it can do
Capture application crashes
Native C/C++ application crash events → Crash reports with stack traces and error details
Report crashes via Breakpad
Application crash data on supported platforms → Formatted crash reports sent to Sentry server
Report crashes via Crashpad
Application crash data on supported platforms → Formatted crash reports sent to Sentry server
Collect crash context information
System state and application data at crash time → Contextual metadata attached to crash reports
Track application errors and exceptions
Runtime errors and exceptions in native code → Error reports with debugging information
Generate stack traces
Crash or error occurrence in native application → Detailed stack trace showing function call hierarchy
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.