https://github.com/variar/qt_cpp_sentry
Cross-platform C++ crash reporting made simple
https://github.com/variar/qt_cpp_sentry
crash-reporting qt sentry
Last synced: about 1 month ago
JSON representation
Cross-platform C++ crash reporting made simple
- Host: GitHub
- URL: https://github.com/variar/qt_cpp_sentry
- Owner: variar
- License: gpl-3.0
- Created: 2020-10-01T18:33:46.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-14T08:24:07.000Z (almost 5 years ago)
- Last Synced: 2025-01-07T23:49:34.124Z (over 1 year ago)
- Topics: crash-reporting, qt, sentry
- Language: CMake
- Homepage:
- Size: 1.11 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Introduction
This is demo project to show how automatic crash reporting may be integrated into C++ application.
Core part of it is [SDK](https://github.com/getsentry/sentry-native) provided by [Sentry](https://sentry.io).
It handles Breakpad/Crashpad linking with the application, collection crash reports and uploading them.
Application has to setup some variable like build version, additional tags etc.
Crash dumps can then be viewed in Sentry dashboard.
Crash report provides information about:
- operating system: name, version, architecture
- Qt version
- modules that were loaded into process: filename, size and hashes for symbols
- stacktraces for all running threads in the process
- memory content for stack frames
These minidumps do not include content of heap process memory during the crash.
# Crash reporting integration at a glance
These steps are required to integrate crash reporting into your C++ application:
1. Create an account at [Sentry](https://sentry.io). Free plan has enough features
to get started.
2. Create a project at Sentry and find DSN string in its settings. Sentry SDK
will send crash reports to this endpoint.
3. Add [native Sentry SDK](https://github.com/getsentry/sentry-native) as a git submodule.
4. Add Sentry directory to CMakeLists.txt. Set Sentry backend to `Crashpad` and transport to `none`.
5. Add dependencies on sentry and crashpad-client to executable targets.
6. Setup Sentry SDK at program start.
1. Create directory for crash reports if needed.
2. Check that directory for new reports (using crashpad library) and ask user
confirmation to send any to Sentry.
3. Initialize Sentry SDK.
7. Shutdown Sentry SDK at program end.