sentry-elixir icon indicating copy to clipboard operation
sentry-elixir copied to clipboard

Add support for :skip_retries config option to Oban.ErrorReporter

Open solnic opened this issue 1 year ago • 4 comments

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 avatar Dec 11 '24 11:12 solnic

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

whatyouhide avatar Sep 15 '25 08:09 whatyouhide

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

solnic avatar Sep 22 '25 14:09 solnic

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 avatar Oct 22 '25 07:10 brendon9x

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)

brendon9x avatar Oct 23 '25 20:10 brendon9x