[ActiveJob] Instrument unhandled errors

I am working on an application that instruments unhandled ActiveJob errors. We added some code to our base class to do this, and I would love to contribute our solution back to Rails.

I understand that there is currently a way to work around this by subscribing to “(perform|enqueue).active_job” then checking the event payload for an exception. Adding something like “unhandled_error.active_job” would be an awesome feature for Rails because it should be a quick win and enable a nice way to expose metrics on unhandled errors in background jobs.