Log Oban errors (and still report them to Sentry) - #4657
Conversation
|
It's worth adding something to changelog as well! |
|
IMHO it's ok not to do the CE branching. It doesn't hurt to log regardless of the build. |
|
I thoughts so too, but decided to go with CE-only since otherwise EE would receive duplicate Sentry reports since error logs get sent there too: Lines 33 to 35 in e7332d9 |
|
Just replace Sentry.capture_exception that's beneath with Logger.error then? |
|
The reports would be a bit different (#3336), is that OK? I'll get some screenshot for the differences for these particular errors. |
|
The differences I see are:
Also, to make it work, I needed to modify the Logger call to Logger.error(
Exception.format(:error, meta.reason, meta.stacktrace),
sentry: %{extra: extra}
)which removes the "Background job failed" message and makes the actual log appear like this which is probably less intuitive for self-hosters. |
|
Seems like I can make both look the same by passing |
|
I've updated the PR and now it logs a "self-hoster-friendly" message but reports a more structured Sentry event, the same way as before. |


This PR adds logging for Oban errors. The reasoning is that most self-hosters don't have Sentry configured which makes these errors invisible.
Here's how it'd look after this PR: