rails: add optional Good Job labels and concurrency key to ActiveJob error context
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 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 小時
- 30 天內合併 PR
- 31
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 個 reaction ·
維護者通常 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 天內回覆