Stamp a correlation id on Ahoy events so one save reads as one action
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc ApplicationController, Analytics::EventBuilder.lifecycle và promotion hook hiện có trong config/initializers/ahoy.rb để theo dõi cách các event được ghi và promote. Kiểm tra issue liên quan #2351 trước khi bắt đầu. Được xem là hoàn tất khi các event từ cùng một request dùng chung một id có thể truy vấn, còn các event từ những request riêng biệt thì không, và jobs cùng rake tasks nhận các id riêng của chúng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🤖 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).
- Ngôn ngữ chính
- Ruby
- Star
- 15
- Fork
- 28
- Merge trung bình
- 1 ngày 12 phút
- Pull request đã merge (30 ngày)
- 262
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rubyforgood/awbw
-
blocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rubyforgood/awbw#2824 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubyforgood/awbw#2822 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rubyforgood/awbw#2160 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update callout faq defualt text when the new person subscription launchesCó thể đã có người làm @maebeale đã nhận 82 ngày trước. Đang mởblocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rubyforgood/awbw#2095 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
rubyforgood/awbw#2088 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rubyforgood/awbw
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
heartcombo/simple_form#1874 ·
-
Category: OneSwap Status: Accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenNebula/one#8237 ·
-
Reconfigure Settings sidebarĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AllYourBot/hostedgpt#882 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
greenelab/lab-website-template#357 · 1 bình luận ·