Fix ProductAnalyticsTracking, do not track event for non-auth user
requested to merge 426011-pipelines-charts-raising-gitlab-internalevents-invalidmethoderror into master
What does this MR do and why?
This MR fixes the case when we were trying to retrieve a required field from a tracked user for non-authenticated requests. Hence getting nil pointer exceptions
This MR prevents tracking for not logged in users.
The open question if we want to count anonymous user for Snowplow events will be discussed in the follow-up issue
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- on master branch try to visit
pipelines/charts
on a public project while not logged in. There will be exceptions raised - on the subject branch there will be no exceptions
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #426011 (closed)
Edited by Niko Belokolodov