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 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.
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.
While working on Active Job support, we also improved support for the background job libraries that we were already integrating with.
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 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" |
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”.
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.Kernel.warn
) when AppSignal is loaded (in appsignal install
and on app boot).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.
Appsignal.monitor_transaction
using Appsignal.set_action
- v2.10.4Appsignal::Config
- v2.10.11working_directory_path
(v2.10.12) and dns_servers
(v2.11.0) environment variable config options.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!