Skip to content

Add Snowplow tracking to analytics_cycle_analytics_group_stages table

Background

For sake of evaluating Desing Spike from Data team https://gitlab.com/gitlab-data/analytics/-/issues/12397 it was requested to add Snowplow tracking that would report on any changes done to analytics_cycle_analytics_group_stages

Goal

Trigger Snowplow event whenever insert, update or delete is called on analytics_cycle_analytics_group_stages table. Snowplow event should report additional data (for the MVC we can use extra attribute from gitlab standard context) coming from following columns:

  • id
  • created_at
  • updated_at
  • relative_position
  • start_event_identifier
  • end_event_identifier
  • group_id
  • start_event_label_id
  • end_event_label_id
  • hidden
  • custom
  • name
  • group_value_stream_id

Implementation tips

  1. Use extra from gitlab standard context to pass additional data
  2. Copy relevant code from PoC at !88295 (closed)
  3. It is ok to have hardcoded list of column and only work on single model for the MVC, we can look for abstractions and automations later on.
  4. Consider using feature flag in order to have more control over feature rollout