Summary
Build a comprehensive health check dashboard endpoint that provides real-time system metrics, dependency status, and performance analytics.
Motivation
Current health endpoints only check basic connectivity. A detailed health dashboard enables proactive monitoring and quick incident response.
Acceptance Criteria
GET /health/dashboard returns comprehensive system status
Metrics: request rate, avg response time, error rate, p95/p99 latency
Dependency status: SQLite, Venice AI, Stellar Horizon, WebSocket
Memory usage, CPU usage, uptime, and garbage collection stats
Agent status: online/offline count, average response time
Task metrics: active, queued, completed, failed counts
Payment metrics: total locked, released, refunded amounts
Metrics refreshed every 5 seconds (cached)
Endpoint protected by admin API key
Unit tests for all metric calculations
Files to Modify
File
Action
backend/src/api/routes/health.ts
Add dashboard endpoint
backend/src/services/metrics.ts
New : metrics collection service
backend/src/services/metrics.types.ts
New : metrics type definitions
backend/src/config/index.ts
Add admin API key configuration
backend/src/api/routes/health.test.ts
Add dashboard endpoint tests
How to Contribute
Create branch feat/health-dashboard
Build metrics collection service
Implement dashboard endpoint with all metrics
Add admin API key protection
Write unit tests for metric calculations
Run npm run test && npm run lint before submitting PR
Summary
Build a comprehensive health check dashboard endpoint that provides real-time system metrics, dependency status, and performance analytics.
Motivation
Current health endpoints only check basic connectivity. A detailed health dashboard enables proactive monitoring and quick incident response.
Acceptance Criteria
GET /health/dashboardreturns comprehensive system statusFiles to Modify
backend/src/api/routes/health.tsbackend/src/services/metrics.tsbackend/src/services/metrics.types.tsbackend/src/config/index.tsbackend/src/api/routes/health.test.tsHow to Contribute
feat/health-dashboardnpm run test && npm run lintbefore submitting PR