Stamp a correlation id on Ahoy events so one save reads as one action
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
まず ApplicationController、Analytics::EventBuilder.lifecycle、および config/initializers/ahoy.rb にある既存の promotion hook を読んで、イベントがどのように書き込まれ、promote されるかを追跡します。開始する前に、関連する #2351 issue を確認してください。完了条件は、1 つのリクエストからのイベントがクエリ可能な id を共有し、別々のリクエストからのイベントは共有せず、jobs と rake tasks がそれぞれ独自の id を受け取ることです。
索引モデルが issue の本文から書いたものです。
説明
🤖 From Claude:
One admin save that touches several records produces several unrelated events. ahoy_events has visit_id, but that's a session, not an action — there is no way to say "these five changes were one save."
A timeline that wants to render "Mae updated this registration" instead of five separate rows needs that grouping, and so does any "undo this action" or "what did that save actually do" view.
Why now rather than later
The column is cheap. The data is not backfillable — every event written before the id exists is permanently ungroupable. This is the same argument that made the capture fixes in #2245 urgent: nothing is lost by shipping the reader later, everything is lost by shipping the writer later.
Sketch
- A per-request uuid (
ApplicationControllersets it alongsideCurrent.user), stamped intopropertiesbyAnalytics::EventBuilder.lifecycleand promoted to a column by the samebefore_validationhook inconfig/initializers/ahoy.rbthat already promotesresource_type/resource_id. - Index it, so grouping is a lookup rather than a scan.
- Jobs and rake tasks get their own id per run, which also gives "what did that job change" for free.
Acceptance
- Two records changed in one request share an id; the same records changed in two requests don't.
- The id is queryable as a column, not only inside the JSON payload.
Related: #2351 (many writes produce no event at all — worth fixing first, since an id on nothing is still nothing).
- 主要言語
- Ruby
- スター
- 15
- フォーク
- 28
- 平均マージ
- 1日 12分
- マージ済み PR(30日)
- 262
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rubyforgood/awbw のほかの issue
-
blocked
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rubyforgood/awbw#2824 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rubyforgood/awbw#2822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rubyforgood/awbw#2160 ·
メンテナーはふだん 1 日以内に返信
-
Update callout faq defualt text when the new person subscription launches対応中かも @maebeale が 79 日前に担当しました。 オープンblocked
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubyforgood/awbw#2095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rubyforgood/awbw#2088 ·
メンテナーはふだん 1 日以内に返信
rubyforgood/awbw の issue をすべて見る
似ている issue
-
L: javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dependabot/dependabot-core#16744 ·
メンテナーはふだん 1 日以内に返信
-
area:core-lib P2 size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信