Monitoring and Metrics

Monitor your RouteMQ application performance and health.

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_status

Redis-Based Metrics

Performance Monitoring

Monitor your application performance:

Debug Mode

Enable debug logging:

This shows detailed information about:

  • Route discovery and loading

  • Message processing and middleware execution

  • Worker management

  • Redis operations and connection status

  • Rate limiting decisions

Next Steps

Last updated