AppSignal Ruby Gem 2.11: Active Job and Friends

Tom Tom de Bruijn on

We just released Ruby Gem 2.11. We are always making things easier to use for you, so more things work out of the box and more instrumentation and dashboarding is built without you doing any heavy lifting. This release has a big overhaul of Active Job support. The cherry on the stroopwafel cake is the automatically generated dashboard with status per queue, queue throughput and queue times. 2.11 also polishes a lot of other integrations. Let’s dive in.

Support for All Active Job Adapters

The Active Job instrumentation had a big overhaul. From now on, the AppSignal gem supports all Active Job adapters and standard Active Job features. No additional configuration is needed, Active Job instrumentation works out-of-the-box.

Previously, Active Job support was implemented per integration of a background job library, such as Sidekiq, Resque, Que and Delayed::Job. Gems that weren’t supported by AppSignal without Active Job were also not supported with Active Job.

From now on, the Active Job integration works for all Active Job adapters. This also includes support for all standard Active Job features, such as queues, queue times (for Rails 6+) and priority (if the gem has a priority system).

And, as a bonus, we will report a new ✨ Magic dashboard ✨ for Active Job once the metrics start coming in, with graphs for job status per queue, queue throughput and queue times.

Read all about our Active Job integration in our docs.

Background Job Libraries Improvements

While working on Active Job support, we also improved support for the background job libraries that we were already integrating with.

Resque

The Resque integration has been completely rewritten. Previously, it was required to include or extend an AppSignal module in all job classes. This is no longer needed.

The Resque integration is now completely automatic. The same for the Resque + Active Job combination. When the AppSignal modules are included, a warning will be printed and logged to remove the include.

Delayed::Job

Delayed::Job has many ways of enqueuing jobs to be processed. In this version, we added support for Delayed::Job.enqueue job_object automatic action naming.

Previously, it would report “unknown” as the action name, but now, it will report the class name of the “job object” combined with the “perform” method name.

1
2
3
4
job_object = NewsletterJob.new("Lorem ipsum...")
Delayed::Job.enqueue job_object
# Previously reported as "unknown"
# Now reported as "NewsletterJob#perform"

Que

The Que gem instrumentation now allows for the customization of action names for AppSignal incidents. Calling Appsignal.set_action("MyCustomJob#perform") inside a Que job will now report the job name as “MyCustomJob#perform”.

Other Changes in This Release

Changes Since the Last Release

Since the Ruby gem 2.10.0 release, we’ve released a bunch of patch versions that are also included in this release. Some highlights are shown below. For the full list, see our changelog.


Please see the changelog on GitHub for even more details about all these improvements, deprecations and other changes. And as always: get in touch if you encounter problems after upgrading, or want help to further set things up. We’re happy to help!

10 latest articles

Go back
Ruby magic icon

Subscribe to

Ruby Magic

Magicians never share their secrets. But we do. Sign up for our Ruby Magic email series and receive deep insights about garbage collection, memory allocation, concurrency and much more.

We'd like to set cookies, read why.