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 天内回复