appsignal

# AppSignal Ruby Gem 2.11: Active Job and Friends

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.

## 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.

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

• Queue time is now reported for custom namespaces, not just the "web" and "background" namespaces.
• Warnings from the AppSignal gem are now routed through Kernel.warn, which allows for customization through Ruby settings. For example, it's now possible to hide the warnings. Do note that when AppSignal reports warnings, this can be because of a deprecation or some other issue. Please resolve the warning by following its instructions if possible, or by contacting us.
• When the AppSignal extension installation fails on a machine, the Ruby gem does not fail and exit the installation. This is by design. We don't want to break app deploys this way. But we noticed that the installation failure wasn't very visible. From now on, AppSignal will print a warning (with Kernel.warn) when AppSignal is loaded (in appsignal install and on app boot).
• Starting from this release, we are collecting what we call environment metadata. This will be used to enrich some views on AppSignal.com, make debugging AppSignal issues easier and in other product improvements.

## 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!