basecamp/marginalia

Sidekiq documents are now out-of-date

Closed this issue · 3 comments

The gem now includes the Sidekiq middleware, so the example in the wiki might lead someone to duplicate the code in their app, potentially overriding any future upstream improvements or fixes.

I tried forking the wiki, but it seems like it's not editable by non-committers.

@geoffharcourt thanks for noticing that. would you mind writing an update here, and I can copy/paste to the wiki?

thanks a lot for your help

Sidekiq Integration

Marginalia has built-in Sidekiq integration. If you were using custom middleware before, you can remove it and use the gem-provided instrumentation.

Enable the Sidekiq instrumentation:

# In config/initializers/sidekiq.rb
Marginalia::SidekiqInstrumentation.enable!

Add the sidekiq_job component to your annotations:

# In config/initializers/marginalia.rb
Marginalia::Comment.components = %i[
  controller_with_namespace
  action
  sidekiq_job
]

If you use job and sidekiq_job you may get some annotation sources overwritten as Hash.

Thanks. All updated.