Active Job
Active Job is a framework for declaring jobs and making them run on a variety of queuing backends shipped with Rails.
The Active Job integration tracks the execution and events from the job being performed.
Metadata
- Job name, e.g.
MyBackgroundJob#perform
as used to group the job for AppSignal incidents. - Events, all
*.active_job
events. - Arguments, the argument given to the job with
perform_later
. - Queue, if the adapter supports multiple queues it tags the sample with the queue name.
- Tag:
queue
, valueString
- Tag:
- Queue time, on Rails 6 and newer, job queue times are reported for the namespace in which the jobs are being processed. This graph can be found on the Performance > Graphs page.
- Priority, if the adapter supports job priority it tags the sample with the configured priority.
- Tag:
priority
, valueString/Number
- Tag:
- Active job id, the job id as reported by the Active Job. This is the internal job id used by Active Job.
- Tag:
active_job_id
, valueString
- Tag:
- Provider job id, the job id as reported by the Active Job adapter. This is the internal job id used by the adapter.
- Tag:
provider_job_id
, valueString/Number
- Tag:
Supported adapters
The Active Job integration supports all Active Job adapters. It may also support adapters not listed on that page, but available as a separate gem. These are not tested against.
Integration with AppSignal supported libraries
Background job libraries AppSignal integrates with separately wrap the Active Job integration. This allows these integrations to more accurately report events and metadata from those libraries themselves and not just Active Job.
If a library is not listed here, the Active Job integration will only instrument the Active Job execution of the job.
Reported metrics
active_job_queue_job_count
- counter- A counter metric reporting the number of processed and failed jobs per queue.
- Tag
queue
:- Named queue in which jobs are processed, e.g.
default
ormailer
.
- Named queue in which jobs are processed, e.g.
- Tag
status
:- Status of each job, either
processed
orfailed
. Jobs that arefailed
are also counted asprocessed
.
- Status of each job, either
active_job_queue_priority_job_count
- counter- A counter metric reporting the number of processed and failed jobs per queue and priority. This metric is only reported if the Active Job adapter supports a priority system.
- Tag
queue
:- Named queue in which jobs are processed, e.g.
default
ormailer
.
- Named queue in which jobs are processed, e.g.
- Tag
status
:- Status of each job, either
processed
orfailed
. Jobs that arefailed
are also counted asprocessed
.
- Status of each job, either
- Tag
priority
:- Priority given to each job, e.g.
0
or1
.
- Priority given to each job, e.g.