Report Active Job jobs through sentry-rails by default

Open
#3,222 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
ruby

Research direction

Read the related changes in getsentry/sentry-ruby#3130, #3134, #3145, and #3173, then locate each adapter's Railtie and its handling of Sentry::Rails.active_job_owns_adapter?. Update Sidekiq, Resque, and Delayed Job so Active Job reporting defaults to sentry-rails ownership while preserving the documented opt-out behavior. Verify the adapter and Rails integration tests cover error and span reporting; the issue identifies no test files.

Written by the indexing model from the issue text.

Description

active_job breaking change Next Major sentry-delayed_job sentry-rails sentry-resque sentry-sidekiq

Since 7.3.0, Sidekiq, Resque, and Delayed Job can hand their Active Job jobs to sentry-rails instead of reporting them through their own integration. This is opt-in today. In the next major, sentry-rails should own Active Job reporting for these adapters by default.

  • Each adapter's Railtie adds its Active Job adapter to config.rails.skippable_job_adapters, so sentry-rails skips those jobs unless the user removes the adapter from that list.
  • When sentry-rails owns the adapter (Sentry::Rails.active_job_owns_adapter?), the adapter gem only isolates the hub and continues the trace, and leaves error and span reporting to sentry-rails.
  • Flipping the default changes which integration reports Active Job errors and spans for existing Sidekiq, Resque, and Delayed Job users, so it is a breaking change.

Related: getsentry/sentry-ruby#3130, getsentry/sentry-ruby#3134, getsentry/sentry-ruby#3145, getsentry/sentry-ruby#3173

Peter Solnica confirmed this was the intended direction when the opt-in landed.

via @dingsdax.

--

View Session [Sentry]

Dominant language
Ruby
Stars
990
Forks
553
Avg merge
1d 19h
Merged PRs (30d)
31

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-ruby

All issues in getsentry/sentry-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.