Background Job Adapters
Rails Pulse supports all ActiveJob adapters out of the box. Learn how tracking works with Sidekiq, Solid Queue, Good Job, Delayed Job, Resque, and more.
Overview
Rails Pulse tracks background jobs automatically using ActiveJob instrumentation hooks. No adapter-specific configuration is required — it works out of the box with any ActiveJob-compatible adapter.
Two tracking modes are used depending on the adapter:
- Enhanced tracking — deeper integration via custom middleware or plugins, providing more accurate timing and retry data
- Universal tracking — standard ActiveJob callbacks that work with any adapter
Supported Adapters
| Adapter | Tracking Mode | Notes |
|---|---|---|
| Sidekiq | Enhanced | Custom Sidekiq middleware for accurate per-attempt timing |
| Solid Queue | Universal | ActiveJob callbacks; works with all Solid Queue features |
| Good Job | Universal | ActiveJob callbacks; compatible with cron and recurring jobs |
| Delayed Job | Enhanced | Custom Delayed::Plugin for extended job lifecycle tracking |
| Resque | Universal | ActiveJob callbacks |
| Any other adapter | Universal | Falls back to standard ActiveJob instrumentation |
Adapter-Specific Notes
Sidekiq
Rails Pulse installs a custom Sidekiq server middleware that wraps each job attempt. This gives more accurate duration tracking across retries compared to universal tracking.
No extra configuration is needed — the middleware is registered automatically when Sidekiq is detected.
Solid Queue
Universal ActiveJob tracking applies. All standard job metrics (duration, status, retries) are captured. Recurring jobs configured via Solid Queue’s mission control are tracked per-execution.
To exclude recurring maintenance jobs from tracking:
RailsPulse.configure do |config|
config.ignored_jobs = ["SolidQueue::RecurringTask"]
end
Good Job
Universal ActiveJob tracking applies. Good Job’s cron-scheduled jobs are tracked individually per execution. To exclude cron jobs:
RailsPulse.configure do |config|
config.ignored_jobs = ["MyScheduledCronJob"]
end
Delayed Job
Rails Pulse installs a custom Delayed::Plugin that hooks into the Delayed Job lifecycle. This enables enhanced tracking including accurate failure detection and retry counts.
Configuration
Customize job tracking in config/initializers/rails_pulse.rb:
RailsPulse.configure do |config|
# Enable or disable job tracking globally (default: true)
config.track_jobs = true
# Performance thresholds for jobs (in milliseconds)
config.job_thresholds = {
slow: 5_000, # 5 seconds
very_slow: 30_000, # 30 seconds
critical: 60_000 # 1 minute
}
# Ignore specific job classes
config.ignored_jobs = [
"ActiveStorage::AnalyzeJob",
"ActiveStorage::PurgeJob"
]
# Ignore specific queues
config.ignored_queues = ["low_priority", "mailers"]
# Capture job arguments for debugging (default: false)
# WARNING: May expose sensitive data — use with caution
config.capture_job_arguments = false
# Per-adapter settings
config.job_adapters = {
sidekiq: { enabled: true, track_queue_depth: false },
solid_queue: { enabled: true, track_recurring: false },
good_job: { enabled: true, track_cron: false },
delayed_job: { enabled: true },
resque: { enabled: true }
}
end
Disabling Tracking Per Job
To skip tracking for a specific job without adding it to ignored_jobs:
class MyBackgroundJob < ApplicationJob
def perform(*args)
RailsPulse.with_tracking_disabled do
# Job logic here — Rails Pulse will not record this execution
end
end
end
Privacy & Job Arguments
Job argument capture is disabled by default to protect sensitive data. Arguments may contain user credentials, PII, API keys, or other sensitive business data.
Only enable capture_job_arguments in development or when explicitly needed for debugging:
RailsPulse.configure do |config|
config.capture_job_arguments = true # Development only
end
Privacy Warning: Do not enable
capture_job_argumentsin production unless you have confirmed that your job arguments contain no sensitive information.
Viewing Job Data
Access the jobs dashboard at /rails_pulse/jobs to view:
- All job classes with aggregate metrics (total runs, failure rate, P95 duration)
- Individual job executions with detailed performance data
- Filter by time range, status, queue, and performance threshold
- Tagging support for organizing jobs by team, priority, or category
Next Steps
- Advanced Configuration — Thresholds, filtering, and data retention
- Tagging — Organize job data with custom tags