appsignal-ruby icon indicating copy to clipboard operation
appsignal-ruby copied to clipboard

Add support for Solid Queue

Open luismiramirez opened this issue 2 years ago • 4 comments

Solid Queue was announced in Rails World 2023.

Start working on its support once released.

https://rubygems.org/gems/solid_queue

The current 0.1.0 gem present in Rubygems is empty.

To do

  • [ ] Instrument jobs
  • [ ] Report errors from jobs
  • [ ] Report useful metadata from jobs: queue name, priority, severity, etc. whatever metadata it has and is useful.
  • [ ] Extra: Report metrics about jobs, similar to our Sidekiq instrumentation. Focus first on the instrumentation and then the metrics. These things can be shipped separately if needed.

luismiramirez avatar Oct 26 '23 10:10 luismiramirez

The code is out now: https://github.com/basecamp/solid_queue

johnnagro avatar Dec 28 '23 18:12 johnnagro

@luismiramirez Any progress on supporting solid queue?

HusseinMorsy avatar Feb 12 '24 08:02 HusseinMorsy

Hi @HusseinMorsy. We'll work on this in the upcoming future. We'll let you know as soon as we start with it.

luismiramirez avatar Feb 19 '24 10:02 luismiramirez

https://app.intercom.com/a/inbox/yzor8gyw/inbox/shared/unassigned/conversation/16410700292701?view=List (private link)

shairyar avatar Mar 07 '24 06:03 shairyar

Right now the workaround is to add this to your production.rb to catch Solid Queue errors

config.solid_queue.on_thread_error = ->(error) { Appsignal.send_error(error) }

And then add

  rescue_from(Exception) do |exception|
    Appsignal.send_error(exception)
    raise exception
  end

To both ApplicationJob and ApplicationMailer.

Ideally AppSignal would hook into these 2 directly and then it'll report regardless of a job backend.

miharekar avatar Mar 20 '24 18:03 miharekar

Hey all! I've been doing some testing to see what the status of solid_queue support is, and it's working in my example app with solid_queue and ActiveJob. I'm getting both performance and error jobs reported in AppSignal.

@HusseinMorsy @miharekar am I correct that you're not getting performance samples for your jobs, but no errors reported from your apps (without adding your own error handlers)? If so, could you tell me a bit more about your applications? I'm specifically looking to see what the differences are between my example app and your apps.

jeffkreeftmeijer avatar Mar 29 '24 18:03 jeffkreeftmeijer

@jeffkreeftmeijer Hmm didn't work out-of-the-box for me at the time. Let me try again.

miharekar avatar Mar 30 '24 07:03 miharekar

I'm closing this one for now. Feel free to reopen if you're having trouble getting AppSignal to report metrics from SolidQueue.

jeffkreeftmeijer avatar Apr 05 '24 12:04 jeffkreeftmeijer

@jeffkreeftmeijer if this gem is supported OOTB, please state so at https://docs.appsignal.com/ruby/integrations/active-job.html

tmaier avatar Jul 27 '24 22:07 tmaier

Hi @tmaier!

Our ActiveJob integration aims to be compatible with all adapters, including SolidQueue, which we support. We'll look into amending our documentation to make it clearer.

unflxw avatar Jul 29 '24 08:07 unflxw