Skip to content

Add user to Snowplow event

Niko Belokolodov requested to merge include_user_on_snowplow_event into master

What does this MR do and why?

Adds user_id to GitLab standard context for Snowplow tracking. This change is behind feature flag until this changes are approved. Feature flag is actor based (can be enabled for chosen users). Closes #338150 (closed)

How to set up and validate locally

  1. Enable feature flag
  2. Track an event
Feature.enable(:add_actor_based_user_to_snowplow_tracking, User.first)
Gitlab::Tracking.event('a', 'b', user: User.first)
  1. user_id will be added to standard context payload

MR acceptance checklist

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

Edited by Niko Belokolodov

Merge request reports