How sentryco/crashkit works
Main Components
a) Core Components:
• Crash Detection System
• Crash Log Management
• Sanitization Engine
• Network Communication Layer
b) External Integration Points:
• Host Application
• Custom Analytics Endpoint (e.g., GA4)
• File System Storage
┌─ Host Application Layer ─────────────────────────┐
• iOS/macOS App (SwiftUI) │
• ┬───────────────────────────┤
• CrashKit Core │ Crash Detection Layer │
• ┌─────────────────┐ │ ┌────────────────────┐ │
• Crashlytic │ │ │ CrashHandler │ │
• (Shared) │ │ │ - Exception │ │
• ┬────────┘ │ │ - Signal │ │
• ┘ │
• ▼ │ │
• ┌─────────────────┐ │ Sanitization Layer │
• Crash Logger │ │ ┌────────────────────┐ │
• ┬────────┘ │ │ Sanitizer │ │
• Custom Rules │ │
• ▼ │ └────────────────────┘ │
• ┌─────────────────┐ │ │
• File Manager │ │ │
• ┬────────┘ │ │
• ┼──────────┴───────────────────────────┘
• ▼
┌─────────────────────┐ ┌─────────────────────┐
• Local Storage │ │ Analytics Endpoint │
• (Crash Log Files) │───▶│ (e.g., GA4) │
• ┘ └─────────────────────┘
Important Relationships to Highlight
a) Data Flow:
• Crash Detection → Crash Logger
• Crash Logger → File Manager
• File Manager → Local Storage
• Local Storage → Analytics Endpoint
b) Dependencies:
• Crashlytic shared instance relationship with CrashHandler
• Sanitizer integration with Crash Logger
• FileManager extensions for storage operations
Implementation Details
• Signal handler implementation
• Exception handler implementation
• File system interaction points
• Sanitization pipeline
• Network communication pattern
Notes Section
Important notes about:
• Privacy considerations
• Initialization requirements
• Platform-specific behaviors
• Testing considerations
Remember to emphasize the modular nature of the system, particularly how it allows for custom sanitization rules and different analytics endpoints, as these are key differentiating features of the project.