Sidekiq: Stacktrace (or line number) for errors

Created on 13 Sep 2016  Â·  3Comments  Â·  Source: mperham/sidekiq

Would it be possible to keep a stacktrace (or at least the line/col which raised the exception) for errors?

Right now it's a bit of guess-work to figure it out.

I know it's possible to grab the error and extract this info (we do this in production), but great benefit with the current admin-UI is that it's simple and convenient.

So extending it with stacktrace/line-number would be in that spirit. ⛵

image

Most helpful comment

sidekiq_options backtrace: true

On Sep 13, 2016, at 07:07, sandstrom [email protected] wrote:

Would it be possible to keep a stacktrace (or at least the line/col which raised the exception) for errors?

Right now it's a bit of guess-work to figure it out.

I know it's possible to grab the error and extract this info (we do this in production), but great benefit with the current admin-UI is that it's simple and convenient. So extending it with stacktrace/line-number would be in that spirit. ⛵

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

All 3 comments

sidekiq_options backtrace: true

On Sep 13, 2016, at 07:07, sandstrom [email protected] wrote:

Would it be possible to keep a stacktrace (or at least the line/col which raised the exception) for errors?

Right now it's a bit of guess-work to figure it out.

I know it's possible to grab the error and extract this info (we do this in production), but great benefit with the current admin-UI is that it's simple and convenient. So extending it with stacktrace/line-number would be in that spirit. ⛵

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mperham Thanks! 😄

I have placed this snippet in my config/initializers/sidekiq.rb file:

#print backtraces when exceptions occur
Sidekiq.default_worker_options = { 'backtrace' => true }

Just remembert to restart the server for the initializer to work

The output should look like this:
screen shot 2016-12-24 at 14 55 53

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HenleyChiu picture HenleyChiu  Â·  4Comments

jlecour picture jlecour  Â·  4Comments

davidcelis picture davidcelis  Â·  3Comments

smanolloff picture smanolloff  Â·  3Comments

mperham picture mperham  Â·  3Comments