How getsentry/sentry-native works
Main Components
a. Core Components:
• Sentry Core Engine
• Transport Layer
• Backend Systems
• Integration Layer
• Platform-specific Modules
b. External Dependencies:
• Crashpad
• Breakpad
• libunwindstack-ndk
• Third-party libraries
Architectural Layers
┌─────────────────────────────────────────────────────────────┐
• Application Layer │
• ┬─────────────────────────────────┘
┌───────────────────────────▼─────────────────────────────────┐
• Sentry Native SDK │
• ┤
• ┌─────────────┐ ┌──────────────┐ ┌────────────────────┐ │
• Integration │ │ Core SDK │ │ Platform-specific │ │
• Layer │ │ │ │ Modules │ │
• ┘ └──────────────┘ └────────────────────┘ │
• ┌─────────────┐ ┌──────────────┐ ┌────────────────────┐ │
• Transport │ │ Backend │ │ Utilities │ │
• Layer │ │ Systems │ │ │ │
• ┘ └──────────────┘ └────────────────────┘ │
• ┬─────────────────────────────────┘
┌────────────────────────▼─────────────────────────────────┐
• External Dependencies │
• ┘
Component Details
a. Core SDK:
• Error/Crash Handling
• Event Processing
• Configuration Management
• Session Management
• Scope & Context Management
b. Transport Layer:
• HTTP Transport (curl/winhttp)
• Disk Transport
• Function Transport
• Custom Transport Options
c. Backend Systems:
• Crashpad Backend
• Breakpad Backend
• In-process Backend
• Platform-specific Handlers
Application → Core SDK → Backend Systems → Transport Layer → Sentry Server
• ↑ ↕ ↕ ↕
• ┴────────────┴───────────────────┘
• Error/Crash Data Flow
Additional Elements
• Platform Support (Windows/Linux/macOS/Android)
• Build System Integration (CMake)
• Testing Infrastructure
• NDK Integration for Android
Implementation Notes
• Cross-platform compatibility
• Multiple backend support
• Flexible transport options
• Integration capabilities
• Error handling flow