Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Stamp a correlation id on Ahoy events so one save reads as one action

オープン
#2,356 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
ruby
領域
backend, database

調査の方向性

まず ApplicationController、Analytics::EventBuilder.lifecycle、および config/initializers/ahoy.rb にある既存の promotion hook を読んで、イベントがどのように書き込まれ、promote されるかを追跡します。開始する前に、関連する #2351 issue を確認してください。完了条件は、1 つのリクエストからのイベントがクエリ可能な id を共有し、別々のリクエストからのイベントは共有せず、jobs と rake tasks がそれぞれ独自の id を受け取ることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement

🤖 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 (ApplicationController sets it alongside Current.user), stamped into properties by Analytics::EventBuilder.lifecycle and promoted to a column by the same before_validation hook in config/initializers/ahoy.rb that already promotes resource_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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rubyforgood/awbw のほかの issue

rubyforgood/awbw の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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