Skip to content

Conversation

@solnic
Copy link
Collaborator

@solnic solnic commented Dec 11, 2024

This is inspired by this thread on Bsky started by @katafrakt:

UPDATE: and also it's based on my experience using Sentry+Oban extensively in the past, where I had to do almost exactly what this PR does :)

https://bsky.app/profile/katafrakt.bsky.social/post/3lcuccw6zik2x

Long story short - there are cases where reporting every job failure as an error is not desired. When you expect that some jobs just fail sometimes due to some external factors, you want to be notified only if all attempts failed.

To solve this, we can introduce a config option to instruct Oban.ErrorReporter what to do when a job failed but it was not the final attempt. This PR proposes such an addition.

@solnic solnic force-pushed the solnic/configurable-oban-error-handler branch from 1b9f82c to 22ea6bf Compare December 11, 2024 11:38
@whatyouhide
Copy link
Collaborator

@solnic what's the status on this? Something we want to pursue?

@solnic
Copy link
Collaborator Author

solnic commented Sep 22, 2025

@whatyouhide on hold until I have time for this, which is after distributed tracing and structured logging, as these are my priorities now.

@brendon9x
Copy link

Hi all – this would be a very useful feature. A common case is AI workloads: I am finding Anthropic fails about 1/250 times so I'm getting Sentries every hour or so. But these are just transient so all Oban jobs are succeeding on the 2nd try.

@solnic – this looks quite close. I would be happy to pick this up if the effort of handing over your vision for this PR isn't going to be more complicated than just doing it yourself.

@brendon9x
Copy link

I think I am following in your footsteps Peter. I worked around this issue and then ran into tracing issues (grateful for the work there too)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants