I'm building an elixir/phoenix project and want to do some additional handling for all uncaught errors including controller, view, router and socket communication errors.
What I want to do is that catch all uncaught errors and send error information to the external error log aggregator and re-raise the error again to go through original error process.
What would be the best option for me for example with following options? :
- use Plug.ErrorHandler
- use a Custom Plug
- implement a Instrumenter
Thank you in advance.