flutter_api_observability 1.1.0
flutter_api_observability: ^1.1.0 copied to clipboard
A production-grade Flutter API Observability Toolkit providing real-time request history, endpoint performance statistics, sensitive data redaction, error normalization, and health reporting for Flutt [...]
Changelog #
1.1.0 #
- Added ApiGuardInterceptor for integrating
flutter_api_observabilitywith existing Dio instances without creating a second HTTP client. - Added Request History (
api.history) storing typedApiRequestRecorditems with unique Request IDs (API-0001), timestamps, durations, status codes, retry counts, and redacted payloads. - Added History Memory Management with
maxHistoryEntries(default 100), FIFO eviction, andmaxHistoryBodyLength(default 4096) payload truncation. - Added Endpoint Performance Statistics (
ApiEndpointStats) including request volume, success rates, average duration, median duration, status code distributions, and consistently slow endpoint detection. - Added History Filtering through
api.failedRequests,api.slowRequests,byEndpoint,byStatusCode, andbyMethod. - Added Diagnostic Snapshot Export through
api.exportDiagnostics()with JSON-safe health metrics, endpoint statistics, and recent request history. - Added History & Health Reset Operations through
api.clearHistory(),api.resetHealth(), andapi.resetDiagnostics(). - Enhanced Sensitive Data Redaction with expanded default keys including
token,password,authorization,access_token,refresh_token,secret,client_secret,api_key,bearer,cookie,set-cookie,credit_card, andcvv, with case-insensitive matching. - Enhanced Structured Logging with unique Request IDs and retry diagnostics including attempt count, failure reason, and backoff delay.
- Added support for observing existing Dio clients through
ApiGuardInterceptor. - Upgraded the Flutter Example App to an interactive API observability dashboard.
- Expanded automated coverage to 46 tests, including history, request IDs, endpoint statistics, retries, redaction, payload truncation, diagnostics export, interceptor integration, security attacks, and stress testing.
1.0.0 #
- Initial release of
flutter_api_observability. - API error normalization for common HTTP and network failures.
- Configurable request logging.
- Sensitive data redaction.
- Retry policies with method safety.
- Slow request detection.
- API health tracking.