Feature/backend circuit health api#576
Open
Emeka-12 wants to merge 4 commits into
Open
Conversation
- Create CircuitHealthService with Redis caching (60s TTL) - Implement comprehensive health information retrieval for all circuit scopes - Add support for querying circuit states (global, bridge, asset) - Include recent transitions tracking with configurable limits - Add manual overrides (whitelisted items) retrieval - Implement cache invalidation and statistics endpoints - Create circuit health API routes with full documentation - GET /api/v1/circuit-health/health - Full circuit health info - GET /api/v1/circuit-health/state - Specific circuit state - GET /api/v1/circuit-health/transitions - Recent transitions - GET /api/v1/circuit-health/overrides - Manual overrides - GET /api/v1/circuit-health/cache/stats - Cache statistics - Add comprehensive payload documentation and schema definitions Closes #circuit-health-api
- Create comprehensive test suite for CircuitHealthService - Test full circuit health retrieval - Test specific circuit state queries - Test caching mechanisms - Test cache invalidation and statistics - Test whitelist operations - Test error handling and graceful degradation - Add detailed API documentation - Complete endpoint reference with examples - Data model definitions - Caching strategy explanation - Integration examples and best practices - Performance characteristics - Error handling documentation - Document all 5 API endpoints with: - Request/response examples - Query parameters - Status codes - Real-world usage patterns
- Fix fastify registration (remove # suffix) to properly resolve in route schemas - Fix circuit health test mocks to correctly simulate chained knex query builders - Fix accessOverview.routes.ts build error by adding 400 response schema
|
@Emeka-12 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the Circuit Health API for monitoring alerting and protection circuits across the Bridge-Watch platform.
Closes #522
Closes #523
Changes
New files:
Modified files: