getsentry / getsentry/sentry-ruby

ActiveJob rework

オープン
#2,932 コメント 1 件 リアクション 1 件 担当者 1 名 @solnic が担当を希望しています GitHub で見る
Improvement Ruby Spans
主要言語
Ruby
スター
987
フォーク
541
平均マージ
17時間 40分
マージ済み PR(30日)
19

説明

### Description

Flip ActiveJob from a fallback to the **primary** background-job integration in `sentry-rails`. One code path covers every AJ-backed adapter (SolidQueue, GoodJob, Sidekiq+AJ, future adapters) with tracing, error capture, and context enrichment. No new gems.

## Current state (recap)

- [sentry-rails/lib/sentry/rails/active_job.rb](sentry-rails/lib/sentry/rails/active_job.rb) wraps `perform_now` with a transaction and exception capture, but bails out when `self.class.queue_adapter.class.to_s` is listed in `config.rails.skippable_job_adapters`.
- [sentry-sidekiq](sentry-sidekiq/lib/sentry-sidekiq.rb#L22), [sentry-resque](sentry-resque/lib/sentry-resque.rb#L21) and [sentry-delayed_job](sentry-delayed_job/lib/sentry-delayed_job.rb#L21) each push their AJ adapter name into that list at boot, so AJ only kicks in when none of those are loaded.
- No enqueue-side instrumentation and no trace propagation between producer and worker on the AJ path.
- SolidQueue / GoodJob work today only because AJ is already the fallback — but without tracing-producer linkage.

## Target state

- AJ integration owns perform-side tracing + error capture for every adapter by default.
- An enqueue-side producer span (`queue.publish`) is created in the calling transaction and carries trace headers on the job payload.
- Worker transaction continues the producer trace when headers are present.
- `sentry-sidekiq` still handles sidekiq-native jobs, but detects AJ-wrapped jobs and defers perform tracing + error capture to the AJ integration (no double reporting, no double spans).
- `sentry-resque` / `sentry-delayed_job` become maintenance-only.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。