Skip to content

Prevent frontend from logging Snowplow events twice

What does this MR do and why?

Currently track_event on the frontend will both trigger a Snowplow event and invoke the /api/v4/usage_data/track_event endpoint which will also trigger a Snowplow event.

This MR changes the API to not track Snowplow events and instead let the frontend do it.

How to set up and validate locally

If you don't have Snowplow Micro set up with GDK, please follow this guide: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/snowplow_micro.md

  1. Check out master
  2. Reset Snowplow Micro by clicking "Reset" at http://gdk.test:9090/micro/ui
  3. Visit http://gdk.test:3000/admin/dev_ops_reports and click the "Dev" tab.
  4. See that two events with "event_name": "i_analytics_dev_ops_adoption" was registered at http://gdk.test:9090/micro/good
  5. Check out the branch for this MR
  6. Redo steps 2 and 3.
  7. See that only one event with "event_name": "i_analytics_dev_ops_adoption" was registered at http://gdk.test:9090/micro/good

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #425883 (closed)

Edited by Niko Belokolodov

Merge request reports