crash_manager 1.0.0
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 metadataUserContext
- User information and context for crashesDeviceInfo
- 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 utilitiesfirebase_crashlytics: ^4.1.3
- Firebase Crashlytics SDKfirebase_core: ^3.6.0
- Firebase core functionalitysentry_flutter: ^8.9.0
- Sentry error trackinglogger: ^2.4.0
- Structured loggingconnectivity_plus: ^6.0.5
- Network connectivity monitoringdevice_info_plus: ^10.1.2
- Device information collectionpackage_info_plus: ^8.0.2
- App version informationdio: ^5.7.0
- HTTP client for API callsshared_preferences: ^2.3.2
- Local storage
Development Dependencies:
flutter_test
- Flutter testing frameworkmockito: ^5.4.4
- Mocking for unit testsbuild_runner: ^2.4.13
- Code generationflutter_lints: ^5.0.0
- Flutter linting rulescustom_lint: ^0.7.5
- Custom lintingflutter_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:
- Check the documentation first
- Search existing issues
- Create a new issue with detailed information
- 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.