getsentry / sentry-native
Sentry SDK for C, C++ and native applications.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing getsentry/sentry-native in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewOfficial Sentry SDK for C/C++ The _Sentry Native SDK_ is an error and crash reporting client for native applications, optimized for C and C++. Sentry allows adding tags, breadcrumbs, and arbitrary custom context to enrich error reports. Supports Sentry _20.6.0_ and later. Note Using the SDK in a standalone use case is currently an experimental feature. The SDK’s primary function is to fuel our other SDKs, like or . Support from our side is best effort and we do what we can to respond to issues in a timely fashion, but please understand if we won’t be able to address your issues or feature suggestions. Resources • SDK Documentation • Discord server for project discussions • Follow @sentry on X for updates Table of Contents • Downloads • What is Inside • Platform and Feature Support • Building and Installation • Compile-Time Options • Build Targets • Runtime Configuration • Known Limitations • Development Downloads The SDK can be downloaded from the [Releases] page, which also lists the changelog of every version. We recommend using our release packages, but if you want to use this repo directly, please follow the contribution guide to understand the setup better. [releases]: https://github.com/getsentry/sentry-native/releases What is Inside The SDK bundle contains the following folders: • : Contains the Sentry header file. Set the include path to this directory or copy the header file to your source tree so that it is available during the build. • : Sources of the Sentry SDK required for building. • : Sources for the Android NDK JNI layer. • : These are vendored dependencies fetched via git submodules (use if you use a git clone rather than a release). Platform and Feature Support The SDK currently supports and is tested on the following OS/Compiler variations: • x64/arm64 Linux with GCC 14 • x64 Linux with GCC 12 • x64 Linux with GCC 9 • x64/arm64 Linux with clang 19 • x86 Linux with GCC 9 (cross compiled from x64 host) • x86, x64 and arm64 Windows with MSVC 2022 • macOS 13, 14, 15, 26 with respective most recent Apple compiler toolchain and LLVM clang 15 + 18 • Android API35 built by NDK27 toolchain • Android API16 built by NDK19 toolchain • PlayStation via sentry-playstation. See PlayStation documentation to get access. • Xbox via sentry-xbox. See the Xbox documentation for access. • Nintendo Switch via sentry-switch. See Nintendo Switch documentation to get access. Additionally, the SDK should support the following platforms, although they are not automatically tested, so breakage may occur: • Windows Versions lower than Windows 10 / Windows Server 2016 • Windows builds with the MSYS2 + MinGW + Clang toolchain (which also runs in CI) The SDK supports different features on the target platform: • **HTTP Transport** is currently only supported on Windows and platforms that have the library available. On other platforms, library users need to implement their own transport, based on the API. • **Crashpad Backend** is currently only supported on Linux, Windows, and macOS. • **Client-side stackwalking** is currently only supported on Linux, Windows, and macOS. Building and Installation The SDK is developed and shipped as a [CMake] project. CMake will pick an appropriate compiler and buildsystem toolchain automatically per platform, and can also be configured for cross-compilation. System-wide installation of the resulting Sentry library is also possible via CMake. The prerequisites for building differ by platform and backend. You will always need to build the code. Additionally, when using the backend, is required. On Linux and macOS, is a prerequisite. For more details, check out the contribution guide. Building the Breakpad and Crashpad backends requires a compatible compiler. **Build example**: Please refer to the CMake Manual for more details. **Android**: The CMake project can also be configured to correctly work with the Android NDK, see the dedicated [CMake Guide] for details on how to integrate it with Gradle or use it on the command line. The folder provides a Gradle project that adds a Java JNI layer for Android, suitable for accessing the sentry-native SDK from Java. See the [NDK Readme] for more details about this topic. [cmake]: https://cmake.org/cmake/help/latest/ [cmake guide]: https://developer.android.com/ndk/guides/cmake [NDK Readme]: ndk/README.md **MinGW**: 64-bit is the only platform supported for now. LLVM + Clang are mandatory here : they are required to generate .pdb files, used by Crashpad for the report generation. For your application to generate the appropriate .pdb output, you need to activate CodeView file format generation on your application target. To do so, update your own CMakeLists.txt with something like . If you use an MSYS2 environment to compile with MinGW, make sure to : • Create an environment variable (ex : ) • Run from : • Build as : **MacOS**: Building universal binaries/libraries is possible out of the box when using the variable, both with the generator as well as the default generator: Ensure that macOS SDK 11 or later is used (we currently only test against versions 13 and above). This may require specifying the : If you build on macOS using _CMake 4_, then you _must_ specify the , because CMake 4 defaults to an empty , which could lead to inconsistent include paths when CMake tries to gather the later in the build. Compile-Time Options The following options can be set when running the cmake generator, for example using . • (Default: ): By default, is built as a shared library. Setting this option to will build as a static library instead. If sentry is used as a subdirectory of another project, the value will be inherited by default. When using as a static library, make sure to before including the sentry header. • (Default: ): By default, is built as a position-independent library. • (Default: ): Enables linking with the static MSVC runtime. Has no effect if the compiler is not MSVC. • (Default: )…