Skip to content

Track when we fallback to default organization

What does this MR do and why?

Introduces a new tracking event and metric to capture events where the current organization falls back to the Default organization. This allows us to identify code paths that needs to be updated before we are able to remove references to the Default organization.

This is behind the track_fallback_organization feature flag to give us control around the sampled request and a switch to disable the tracking if necessary. Otherwise, we can expect a very high amount of events to be generated as every unauthenticated sessions would likely trigger the tracking.

See #499994 (closed) and #474975 (closed) for more context.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

No visual change

How to set up and validate locally

  1. Run the following in the terminal rails runner scripts/internal_events/monitor.rb fallback_current_organization_to_default
  2. Open any page in the GitLab rails app locally without authentication.
  3. An event should be captured by the Internal Events Monitor.

Note: The Label column in the internal events table will be blank as described in this bug issue. You can replace the key in the internal event monitor script from se_label to label and rerun the CLI command from step (1).

Related to #499994 (closed)

Edited by Shane Maglangit

Merge request reports

Loading