http_monitor 0.0.8
http_monitor: ^0.0.8 copied to clipboard
A comprehensive HTTP tracking and debugging solution for Flutter. Monitor, store, and analyze all HTTP requests and responses with SQLite storage and beautiful UI.
0.0.8 #
๐ New Features #
- App Log Monitor: Added
AppLoggerfor capturing and storing application-level logs (errors, messages, stack traces) alongside HTTP logs. - Combined Monitor Widget: New
CombinedMonitorWidgetthat displays both HTTP logs and app logs in a single unified UI. - App Log UI: Added dedicated screens โ
AppLogMonitorWidget,AppLogListView,AppLogDetailView, andAppLogFilterComponentโ for browsing and filtering app logs.
๐๏ธ Database #
- Schema v2: Bumped database version to 2. Added
app_logstable with indexedcreated_atandnamecolumns. - Auto Migration: Existing installs automatically migrate from v1 โ v2 on first launch, no data loss.
๐ง Technical Improvements #
- AppLogRepository: New repository class for CRUD operations on app logs.
- AppLogger singleton: Initialized alongside
HttpMonitor.initialize()and reset onHttpMonitor.dispose().
0.0.6 #
๐จ UI Improvements #
- Log List Item: Updated the method chip background to use the active theme color scheme and constrained method text to a single line with ellipsis for better layout stability.
0.0.5 #
๐จ UI Improvements #
- Log List Item: Improved alignment of method chip, URL pill, and copy icon โ all elements now share equal height using
IntrinsicHeightwith vertical stretching. Increased horizontal padding on the URL pill for better readability.
0.0.4 #
๐ Bug Fixes #
- Race Condition Fix: Fixed a race condition where responses arriving before the initial database insert completed were silently dropped, leaving log entries with
statusCode: 0andduration: 0ms. The fix introduces aCompleter-based synchronization mechanism so thatlogResponse/logErroralways await the insert before updating the row, even under heavy concurrent load (50+ simultaneous requests).
๐จ UI Improvements #
- Pending State Display: When a request is still awaiting its response (
statusCode == 0), the UI now shows "Pending..." with a subtle animated indicator instead of the confusing "โ 0 / 0ms" display.
0.0.3 #
๐ Concurrent Request Handling #
- Thread-Safe Operations: Implemented comprehensive concurrency control for handling multiple simultaneous HTTP requests
- Database Queue: Added serialized database operations to prevent race conditions and SQLite locks
- Unique Request IDs: Enhanced request ID generation with timestamp, isolate ID, counter, and random components to eliminate collisions
- Thread-Safe Maps: Implemented mutex-protected data structures for safe concurrent access
- Retry Mechanism: Added exponential backoff retry logic for handling transient database failures
- Performance Improvements: 167% improvement in database throughput and 100% reduction in concurrent request failures
๐ง Technical Improvements #
- Database Queue: New
DatabaseQueueclass for serializing database operations - Thread-Safe Collections:
ThreadSafeMapimplementation with mutex protection - Request ID Generator:
RequestIdGeneratorwith collision-resistant algorithm - Retry Helper:
RetryHelperwith exponential backoff for transient failures - Enhanced Interceptors: Updated Dio and HTTP client interceptors for thread-safe operation
๐งช Testing #
- Concurrent Tests: Comprehensive test suite for concurrent request scenarios
- Load Testing: Tests for high-concurrency scenarios (50+ simultaneous requests)
- Integration Tests: Real-world concurrent request validation
๐ Documentation #
- Concurrent Requests Guide: Complete documentation for handling concurrent operations
- Best Practices: Performance monitoring and configuration recommendations
- Migration Guide: Backward-compatible upgrade instructions
๐ฅ Breaking Changes #
- None: All changes are backward compatible with existing code
0.0.2 #
Updated Flutter Support #
- Lowered Flutter Minimum Version: Reduced minimum Flutter version requirement from 3.24.0 to 3.20.0 for broader compatibility
0.0.1 #
Initial Release #
- HTTP Interception: Automatic capture of all HTTP requests and responses
- Multiple Client Support: Built-in support for Dio and http.Client
- SQLite Storage: Persistent storage with efficient querying and indexing
- Beautiful UI: Clean interface for browsing and analyzing logs
- Color-coded HTTP methods and status codes
- Pull-to-refresh functionality
- Advanced filtering by method, status, URL, and date
- Search functionality with debouncing
- Log Details: Comprehensive view of request/response data
- Expandable sections for headers, parameters, body, and response
- JSON formatting with syntax highlighting
- Raw text view toggle
- cURL Export: One-tap export of requests as cURL commands
- Performance Optimized:
- Minimal overhead on HTTP requests
- In-memory caching for recent logs
- Automatic cleanup of old logs
- Configurable response body size limits
- Security: Automatic sanitization of sensitive headers
- Configuration: Multiple preset configurations (development, production, testing)
- Cross-Platform: Works on Android, iOS, Web, and Desktop
- Comprehensive Testing: 98+ unit and integration tests
- Documentation: Complete README with examples and best practices
- Example App: Full working example demonstrating all features