Logging Exceptions on Prod

I have an umbrella app(having one core Elixir and two Phoenix apps) running on prod in a docker container. In the dev environment if there is an error a stack trace is shown which can help us debug the issue.
In prod, all the debug messages are being shown, however, the exception isn’t. Is there a setting to be done for the logger to show all the information.
From the logger documentation here Logger — Logger v1.11.4, if we keep it to debug then we should see everything but all I get is a 500 error response without any trace. Any help is appreciated.

Check out this Cowboy handlers proably exit, not being logged or reported anywhere. It may be the source of your problem. The exception should be shown, maybe there is something other capturing that message?

Additionally you can try Sentry to handle errors logging in more developer friendly way.

Thanks @hauleth will check this out, could probably be the reason. I had added sentry, but for sentry to work the error log should come, for some reason the error log itself doesn’t come.