Hello!
I was working with the library Quantum. It allows you to run jobs/tasks on a cron-like schedule (very useful tool!). However, my jobs were failing and I wasn't being notified about the failure.
One of the reasons this was occurring is because Sentry (error tracking service) relies on the `crash_reason` metadata key to report exceptions. It turns out transforming `{kind, reason}` available in `catch` into the format required for `crash_reason` is not straightforward.
I was able to find a snippet of broadway code that accomplishes this:
Here's the patch I submitted to Quantum to perform similar logic:
I think it would be very helpful to have a way to log exceptions that are caught in `catch`. Something like the `log_exception` function above, maybe built directly into the `Logger` module as a `exception` function? I don't have enough familiarity with the stdlib to have a good sense of where this function should go, but it feels important to have an easy way to log an exception in a way that will be picked up by logging backends watching for exceptions.
Curious what folks think!
Mike