rails: add optional Good Job labels and concurrency key to ActiveJob error context
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 54/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ruby
- 領域
- backend, observability
調査の方向性
Start by reading the current ActiveJobExtension context and error-data path; the issue explicitly says to use it rather than the removed SentryReporter.sentry_context. Check how that path builds contexts and handles optional job methods, then compare the result with the Good Job identity APIs in the specification. Done means the documented good_job context includes labels and any present legacy concurrency key, with neither field added as a tag.
索引モデルが issue の本文から書いたものです。
説明
Summary
When an ActiveJob instance exposes Good Job identity APIs, attach labels and legacy concurrency_key under a good_job context on error (and optionally on the job scope).
Motivation
Official ActiveJob / job-extension reporting already records queue, executions, latency, and messaging fields. It does not record Good Job's concurrency identity (good_job_labels, and on older 4.x good_job_concurrency_key). Those fields help explain why a job was limited or which concurrency cohort it belonged to.
Specification
- Duck-type only:
- if
job.respond_to?(:good_job_labels)->contexts.good_job.labels = Array(job.good_job_labels) - if
job.respond_to?(:good_job_concurrency_key)and value present ->contexts.good_job.concurrency_key
- if
- Do not set these as tags (label cardinality).
- Hook current
ActiveJobExtensioncontext / error-data path (not removedSentryReporter.sentry_context). - No-op when methods are absent.
Guide-level
A failing job that uses Good Job concurrency labels shows contexts.good_job.labels on the event. Hosts on Good Job 5+ without concurrency_key simply omit that field.
Drawbacks / alternatives
- Adopt: small adapter-specific branch in a shared ActiveJob path.
- Do nothing: lose concurrency cohort signal on errors.
- Rejected: tags for labels.
- Rejected: nest only under
extraifcontexts.good_jobis unacceptable; prefer contexts for structured identity.
Prior art
- Official Good Job cron / ActiveJob work: #3199, #3200
- Community
sentry-good_jobContextHelpers (prior art only)
Unresolved questions
- Apply on successful transactions too, or only on captured exceptions?
- Name the context key
good_jobvs extendactive_job?
References
- 主要言語
- Ruby
- スター
- 990
- フォーク
- 553
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 31
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-ruby のほかの issue
-
Bug Ruby Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-ruby#3228 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Shorter rate limit in the same header replaces a longer one対応中かも @sentry-junior が 5 日前に担当しました。 オープンBug Ruby
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-ruby#3211 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Events dropped client-side for size are only logged at debug level and not recorded as lost対応中かも @sentry-junior が 5 日前に担当しました。 オープンBug Junior: repro Ruby
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-ruby#3209 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Ship fewer files with the gems対応中かも @solnic が 1 日前に担当しました。 オープンImprovement Ruby Waiting for: Product Owner
getsentry/sentry-ruby#3223 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
active_job breaking change Next Major sentry-delayed_job sentry-rails sentry-resque sentry-sidekiq
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
getsentry/sentry-ruby#3222 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry-ruby の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
開発用DockerイメージにPlaywrightのシステム依存を追加する対応中かも @momocus が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
sakazuki-org/sakazuki#1453 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
jenkins-infra/jenkins.io#9615 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtime対応中かも @Goldziher が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信