crash_manager 1.0.0 copy "crash_manager: ^1.0.0" to clipboard
crash_manager: ^1.0.0 copied to clipboard

A comprehensive Flutter crash manager package with Firebase Crashlytics and Sentry support.

Changelog #

All notable changes to the Flutter Crash Manager package will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2024-01-20 #

πŸŽ‰ Initial Release #

Added

Core Features:

  • Complete crash reporting manager system with dependency inversion
  • Abstract CrashManager interface for unified crash reporting
  • Firebase Crashlytics implementation (FirebaseCrashManager)
  • Sentry implementation (SentryCrashManager)
  • Multi-service implementation (MultiCrashManager)

Data Models:

  • CrashReport - Comprehensive crash report model with all metadata
  • UserContext - User information and context for crashes
  • DeviceInfo - Device and app information collection
  • All models extend BaseDataModel from flutter_shared_utilities

Core Functionality:

  • Fatal and non-fatal crash reporting
  • Custom crash report creation and submission
  • User context management with authentication status
  • Device information collection across all platforms
  • Custom attributes and metadata support
  • Breadcrumb logging for debugging trails
  • Session management and tracking
  • Crash filtering with custom filter functions
  • Privacy controls with sensitive data sanitization

Utilities:

  • CrashUtils - Helper functions for crash management
    • Crash ID generation
    • Error message extraction
    • Stack trace truncation
    • Crash report formatting
    • Data sanitization
    • Crash deduplication
  • DeviceInfoCollector - Cross-platform device information
    • Android, iOS, macOS, Windows, Linux, Web support
    • Screen size, memory, connectivity information
    • App version and build information

Firebase Crashlytics Integration:

  • Complete Firebase Crashlytics SDK integration
  • Automatic Flutter error handling setup
  • Device context and user information syncing
  • Custom key and attribute support
  • Breadcrumb logging
  • Crash filtering
  • Pending reports management

Sentry Integration:

  • Full Sentry Flutter SDK integration
  • User context and device information
  • Custom tags and extra data
  • Breadcrumb support with levels
  • Scope management
  • Exception capturing with custom levels

Multi-Service Support:

  • Simultaneous use of multiple crash reporting services
  • Parallel operation execution for performance
  • Individual service error handling
  • Crash-free percentage aggregation
  • Safe operation execution with error isolation

Type Safety:

  • Comprehensive null safety throughout
  • Safe type conversion utilities
  • Proper error handling patterns
  • No force unwrapping or unsafe casting

Platform Support:

  • βœ… Android
  • βœ… iOS
  • βœ… macOS
  • βœ… Windows
  • βœ… Linux
  • βœ… Web

Dependencies

Core Dependencies:

  • flutter_shared_utilities: ^1.0.4 - Base data models and utilities
  • firebase_crashlytics: ^4.1.3 - Firebase Crashlytics SDK
  • firebase_core: ^3.6.0 - Firebase core functionality
  • sentry_flutter: ^8.9.0 - Sentry error tracking
  • logger: ^2.4.0 - Structured logging
  • connectivity_plus: ^6.0.5 - Network connectivity monitoring
  • device_info_plus: ^10.1.2 - Device information collection
  • package_info_plus: ^8.0.2 - App version information
  • dio: ^5.7.0 - HTTP client for API calls
  • shared_preferences: ^2.3.2 - Local storage

Development Dependencies:

  • flutter_test - Flutter testing framework
  • mockito: ^5.4.4 - Mocking for unit tests
  • build_runner: ^2.4.13 - Code generation
  • flutter_lints: ^5.0.0 - Flutter linting rules
  • custom_lint: ^0.7.5 - Custom linting
  • flutter_custom_lints: ^1.0.3 - Additional Flutter lints

Documentation

  • πŸ“– Comprehensive README with setup instructions
  • πŸ”§ Firebase Crashlytics setup guide for Android and iOS
  • πŸ”§ Sentry setup and configuration guide
  • πŸ’» Complete API documentation with examples
  • πŸ“ Best practices and usage patterns
  • πŸ› Troubleshooting guide for common issues
  • 🎯 Advanced usage examples with filtering and context

Examples

  • Basic crash manager setup
  • Firebase Crashlytics configuration
  • Sentry integration examples
  • Multi-service crash manager usage
  • Custom crash filtering implementation
  • Advanced context and metadata setup
  • Performance monitoring integration
  • Error boundary implementation

Technical Details #

Architecture

  • Clean Architecture principles with clear separation of concerns
  • Dependency inversion with abstract interfaces
  • Repository pattern for crash reporting services
  • Strategy pattern for multiple service support
  • Observer pattern for crash filtering

Performance

  • Asynchronous operations throughout
  • Parallel execution for multi-service operations
  • Efficient memory usage with proper disposal
  • Background processing for crash reporting
  • Rate limiting and throttling support

Security & Privacy

  • Built-in sensitive data sanitization
  • Configurable privacy controls
  • Secure token and credential handling
  • GDPR compliance considerations
  • User consent management support

Testing

  • Unit tests for all core functionality
  • Integration tests for service implementations
  • Mock implementations for testing
  • Test utilities for crash simulation
  • Comprehensive test coverage

Breaking Changes #

None - This is the initial release.

Migration Guide #

This is the initial release, no migration needed.

Known Issues #

  • None at this time

Deprecations #

  • None

[Unreleased] #

Planned Features #

  • Analytics integration for crash trends
  • Custom crash grouping algorithms
  • Real-time crash monitoring
  • Crash prediction and prevention
  • Enhanced performance monitoring
  • ML-based crash analysis
  • Custom dashboard integration
  • Webhook support for notifications
  • Advanced filtering with regex patterns
  • Crash impact scoring
  • User journey reconstruction
  • A/B testing integration for crash rates

Future Improvements #

  • Enhanced offline support
  • Custom encryption for sensitive data
  • Advanced sampling strategies
  • Custom reporting intervals
  • Batch processing optimization
  • Memory usage optimization
  • Battery usage monitoring
  • Network usage tracking
  • Custom crash categories
  • Enhanced debugging tools

Support & Feedback #

If you encounter any issues or have feature requests, please:

  1. Check the documentation first
  2. Search existing issues
  3. Create a new issue with detailed information
  4. Include crash manager version, Flutter version, and platform details

Contributing #

We welcome contributions! Please see our Contributing Guide for details on:

  • Code style and standards
  • Testing requirements
  • Pull request process
  • Development setup
  • Release process

License #

This project is licensed under the MIT License - see the LICENSE file for details.