A modern, cross-platform demo for sentry-native, the Sentry SDK for native (C/C++) applications.
It is a desktop control center for a fictional fleet of Empower Plant IoT devices: a GPU-rendered dashboard with live telemetry, background pipelines, a real backend integration, and a Chaos Lab that triggers a curated taxonomy of crashes, hangs and errors — each instrumented with breadcrumbs, spans, tags, contexts and attachments so the resulting Sentry issue is fully debuggable (and a great showcase for Seer's root-cause analysis).
It runs on Linux, macOS and Windows and uses the new out-of-process native crash backend (no Breakpad, Crashpad or in-process handler).
All platforms need a C++17 compiler, CMake ≥ 3.16, and Git. Everything else — the Sentry SDK, GLFW, Dear ImGui, the Rubik and Font Awesome fonts, and stb — is fetched automatically by CMake on first configure (so the first build needs network access).
| OS | Install |
|---|---|
| Linux (Debian/Ubuntu) | sudo apt-get install build-essential cmake git xorg-dev libgl1-mesa-dev libcurl4-openssl-dev |
| macOS | xcode-select --install and brew install cmake (uses the system OpenGL and libcurl) |
| Windows | Visual Studio 2022 with the Desktop development with C++ workload, plus CMake and Git. CMake's default generator finds MSVC — no extra setup. |
Linux / macOS — a convenience Makefile wraps CMake:
export SENTRY_DSN="https://<key>@<org>.ingest.sentry.io/<project>"
make run # builds, then launches the GUIOr drive CMake directly:
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMPOWER_BUILD_GUI=ON
cmake --build build --parallel
./build/empower-fleetWindows (Developer Command Prompt or PowerShell):
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMPOWER_BUILD_GUI=ON
cmake --build build --config RelWithDebInfo --parallel
set SENTRY_DSN=https://<key>@<org>.ingest.sentry.io/<project>
build\empower-fleet.exeWithout a SENTRY_DSN the app still runs, but events are dropped instead of being sent. Open the Chaos Lab tab and trigger any fault — the Convoluted Chain is the headline scenario for Seer.
The build produces three binaries (each with the sentry-crash daemon copied next to it):
empower-fleet— the GUI Fleet Control Centerempower-headless— headless autopilot / remote command listener (used by CI)empower-smoke— a connectivity smoke test
On macOS the binaries are ad-hoc codesigned at build time with the
get-task-allowentitlement (cmake/get-task-allow.entitlements) so the crash daemon can capture full minidumps.
| Area | Detail |
|---|---|
| Crash reporting | New native backend with out-of-process minidump daemon + client-side stackwalk, async upload |
| Crash taxonomy | Null deref, use-after-free (cross-thread), stack overflow, divide-by-zero, heap corruption, abort, GPU device-lost, app-hang, and a convoluted chain (corruption now, crash later, far away) |
| Performance | Transactions and child spans around pipelines and backend calls |
| Distributed tracing | sentry-trace / baggage propagation to the shared Empower Plant Flask backend |
| Structured logs | sentry_log_*, streamed live on the Telemetry page |
| Metrics | sentry_metrics_gauge / _distribution for frame time, queue depth, devices online |
| Sessions / release health | Automatic session tracking |
| App-hang / ANR | App-hang watchdog with a UI-thread heartbeat |
| Attachments | Calibration blobs and a live UI screenshot attached to events on every platform |
| Screenshots | SDK screenshot capture on Windows; offscreen-rendered UI PNG attachment elsewhere |
| External crash reporter | Auto-wires the official sentry-desktop-crash-reporter, themed for Empower Plant |
| User feedback | Collected through the external crash reporter |
| Telemetry | Chaos Lab |
|---|---|
![]() |
![]() |
| Variable | Default | Purpose |
|---|---|---|
SENTRY_DSN |
— | Sentry DSN; events are dropped if unset |
SENTRY_ENVIRONMENT |
production |
Sentry environment |
SENTRY_RELEASE |
baked in at build time (empower.native@<git-sha>) |
Release identifier; matches the release CI creates |
EMPOWER_BACKEND_URL |
https://flask.empower-plant.com |
Backend used for distributed tracing |
EMPOWER_CRASH_REPORTER |
auto-detected next to the binary | Path to the external crash reporter |
EMPOWER_DEBUG |
unset | Set to enable verbose SDK logging |
The same core runs without a window — used by CI to ingest events on a schedule.
# Self-drive for 90s emitting transactions/metrics/logs, then crash:
build/empower-headless --autopilot --duration 90
# Run a single scenario by id:
build/empower-headless --crash convoluted
# Accept remote commands over HTTP:
build/empower-headless --listen 8799
curl -X POST http://127.0.0.1:8799/trigger/heap-corruptionThe GUI also renders a screenshot offscreen for review/CI without a display:
build/empower-fleet --shot fleet.png --page 0Two GitHub Actions workflows under .github/workflows:
ci.ymlbuilds on Linux/macOS/Windows, generates debug symbols (.dSYM/.pdb/ ELF), uploads debug information files withsentry-cli debug-files upload --include-sources, creates a Sentry release, bundles the external crash reporter, and publishes build artifacts.run-demo.ymlruns on a schedule, downloads the latest build per OS, and runs the autopilot (which is expected to crash), continuously feeding meaningful, symbolicated events into the project.
Both require the SENTRY_DSN, SENTRY_ORG, SENTRY_PROJECT and SENTRY_AUTH_TOKEN secrets.
Every Chaos Lab scenario and the exact fault it produces is documented in CONTRIBUTING.md.
This demo is built on the following open-source components, all fetched at build time (nothing is vendored into the repository). Their licenses are permissive and compatible with this project's Apache-2.0 license:
| Component | Used for | License |
|---|---|---|
| sentry-native | Sentry SDK + native crash backend | MIT |
| Dear ImGui | Immediate-mode GUI | MIT |
| GLFW | Window + OpenGL context | Zlib |
| stb_image_write | PNG screenshot encoding | Public Domain / MIT |
| libcurl | HTTP for distributed-trace backend calls | curl (MIT-style) |
| Rubik | UI typeface | SIL Open Font License 1.1 |
| Font Awesome 6 Free | UI icons | SIL OFL 1.1 (fonts) · CC BY 4.0 (icons) · MIT (code) |
| sentry-desktop-crash-reporter | External crash reporter UI | MIT |
Apache License 2.0 — see LICENSE. Copyright Functional Software, Inc. dba Sentry.


