Comprehensive system health monitoring, performance metrics, and observability endpoints.
This module provides a complete observability and monitoring solution for the WayrApp language
learning platform backend, implementing comprehensive health checks, performance metrics collection,
and operational management endpoints. The routes support both development debugging and production
monitoring scenarios, with integration capabilities for container orchestration and external
monitoring systems.
The module implements multiple health check endpoints ranging from basic system status to detailed
component-specific diagnostics. It provides Kubernetes-compatible readiness and liveness probes
for container orchestration, Prometheus-compatible metrics export for monitoring infrastructure,
and operational endpoints for cache management and performance monitoring controls.
Key features include comprehensive system health monitoring (database, cache, memory, system),
Kubernetes-compatible readiness and liveness probes, Prometheus metrics export for monitoring
integration, detailed performance metrics with request tracking, operational cache management
endpoints, database-specific health diagnostics with table counts and connection pool status,
and comprehensive error handling with appropriate HTTP status codes.
The health check endpoints are designed to provide actionable insights for both automated
monitoring systems and human operators. All endpoints include proper error handling and return
structured JSON responses with timestamps and detailed component status information.
Author
Exequiel Trujillo
Since
1.0.0
Example
// Mount health routes in main application importhealthRoutesfrom'@/shared/routes/healthRoutes'; app.use(healthRoutes);
Example
// Available health check endpoints: // GET /health - Basic system health check // GET /health/detailed - Comprehensive health report // GET /health/database - Database-specific diagnostics // GET /health/cache - Cache system diagnostics // GET /ready - Kubernetes readiness probe // GET /live - Kubernetes liveness probe
Example
// Monitoring and metrics endpoints: // GET /metrics - Performance metrics in JSON format // GET /metrics/prometheus - Prometheus-compatible metrics // POST /metrics/reset - Reset performance counters // POST /cache/clear - Clear application cache // POST /cache/cleanup - Cleanup expired cache entries
Comprehensive system health monitoring, performance metrics, and observability endpoints.
This module provides a complete observability and monitoring solution for the WayrApp language learning platform backend, implementing comprehensive health checks, performance metrics collection, and operational management endpoints. The routes support both development debugging and production monitoring scenarios, with integration capabilities for container orchestration and external monitoring systems.
The module implements multiple health check endpoints ranging from basic system status to detailed component-specific diagnostics. It provides Kubernetes-compatible readiness and liveness probes for container orchestration, Prometheus-compatible metrics export for monitoring infrastructure, and operational endpoints for cache management and performance monitoring controls.
Key features include comprehensive system health monitoring (database, cache, memory, system), Kubernetes-compatible readiness and liveness probes, Prometheus metrics export for monitoring integration, detailed performance metrics with request tracking, operational cache management endpoints, database-specific health diagnostics with table counts and connection pool status, and comprehensive error handling with appropriate HTTP status codes.
The health check endpoints are designed to provide actionable insights for both automated monitoring systems and human operators. All endpoints include proper error handling and return structured JSON responses with timestamps and detailed component status information.
Author
Exequiel Trujillo
Since
1.0.0
Example
Example
Example