fix(oban): handle non-list stacktraces in Oban error reporter#1071
Merged
Conversation
When an Oban job dies from a gen-call exit (for example a GenServer.call
or a NimblePool/Finch checkout timeout), Oban surfaces the
`{module, function, args}` from the exit reason in the `:stacktrace`
field of the `[:oban, :job, :exception]` telemetry metadata rather than a
stacktrace list.
`Sentry.Integrations.Oban.ErrorReporter` forwarded that value straight
into Sentry's `:stacktrace` option, which only accepts a list. The
resulting `NimbleOptions.ValidationError` crashed the telemetry handler,
and `:telemetry` then permanently detached it — so the affected node
stopped reporting all Oban job errors to Sentry until restart.
Coerce any non-list stacktrace to an empty list before use, which then
falls back to the synthesized worker frame just like the existing
empty-stacktrace path.
3e1a19c to
348d047
Compare
Collaborator
Author
solnic
approved these changes
May 27, 2026
Collaborator
|
@whatyouhide no worries, great that we know what is causing it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an Oban job dies from a gen-call exit, Oban surfaces the
{module, function, args}from the exit reason in the:stacktracefield of the[:oban, :job, :exception]telemetry metadata, and not a stacktrace list.Sentry.Integrations.Oban.ErrorReporter.report/5passes that value straight into Sentry's:stacktraceoption, which is typed as a list. This results in an error (that we saw in production):The handler raises, and
:telemetrythen permanently detaches it. The affected node stops reporting all Oban job errors to Sentry until it restarts, so the first such exit silently creates an observability blind spot.The existing normalization at the top of
report/5only handled the empty-list ([]) case; any other non-list value fell straight through.