Monitoring and Metrics
Topics
Health Check Endpoint
from core.redis_manager import redis_manager
from core.controller import Controller
class HealthController(Controller):
@staticmethod
async def health_check(payload, client):
health_status = {
"status": "healthy",
"timestamp": time.time(),
"services": {}
}
# Check Redis
if redis_manager.is_enabled():
try:
await redis_manager.set("health_check", "ok", ex=10)
health_status["services"]["redis"] = "healthy"
except:
health_status["services"]["redis"] = "unhealthy"
health_status["status"] = "degraded"
return health_statusRedis-Based Metrics
Performance Monitoring
Debug Mode
Next Steps
Last updated