Open Radiergummi opened 2 years ago
Facing same issue in application. Try to handle it Handlers but ultimately it failed request. Is there any solution for this?
I solved it by writing my own middleware that wraps the calls in try-catch, but that isn't a good solution.
Currently, if Redis isn't reachable, a StorageException is thrown by the Redis adapter. This might happen in containerised deployments, for example, where the Redis container is not ready yet. If that's the case, and Prometheus Laravel Route Middleware is enabled, the histogram observation will throw the exception and cause every request to fail until Redis is available.
I'm a firm believer in that monitoring infrastructure should never bring an application down. Metrics are never as important as customer requests. If you like it this way, there should be at least a configuration option to catch and log the error instead of throwing