Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,356 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ruby
Área
backend, database

Línea de trabajo

Empieza leyendo ApplicationController, Analytics::EventBuilder.lifecycle y el hook de promoción existente en config/initializers/ahoy.rb para seguir cómo se escriben y promocionan los eventos. Revisa el issue relacionado #2351 antes de empezar. Se considera terminado cuando los eventos de una misma solicitud comparten un id consultable, mientras que los eventos de solicitudes distintas no, y los jobs y rake tasks reciben sus propios ids.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
Ruby
Estrellas
15
Forks
28
Merge medio
1 d 12 min
PR fusionados (30 d)
262

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rubyforgood/awbw

Todos los issues de rubyforgood/awbw

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.