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.
1job_object = NewsletterJob.new("Lorem ipsum...")
2Delayed::Job.enqueue job_object
3# Previously reported as "unknown"
4# 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 (inappsignal 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.
- Support custom action names in
Appsignal.monitor_transaction
usingAppsignal.set_action
- v2.10.4 - Allow skipping errors for a request in Grape. - v2.10.5
- Only report queued AppSignal payloads for the current app configuration. - v2.10.6
- Delayed::Job action name reporting improvements - v2.10.8
- Support Rubygems http_proxy for extension download - v2.10.9
- Support setting the configuration file location in
Appsignal::Config
- v2.10.11 - Add
working_directory_path
(v2.10.12) anddns_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!