Skip to content

Add product_analytics_enabled application setting

Max Woolf requested to merge 376678-enable-disable-product-analytics-stack into master

What does this MR do and why?

  • Adds an application setting to enable or disable the new product analytics stack currently in development.

How to set up and validate locally

  • Make sure the migration in this MR has been executed.
  • Enable the feature flag (we're not testing that here): Feature.enable(:cube_api_proxy)
  • Attempt to initialize the analytics stack for a project:
    ProductAnalytics::InitializeStackService.new(container: Project.first, current_user: User.first).execute
  • Validate that an instance of ProductAnalytics::InitializeAnalyticsWorker was not enqueued in sidekiq.
  • Enable the newly created application setting: Gitlab::CurrentSettings.update!(product_analytics_enabled: true)
  • Attempt to initialize the analytics stack for a project:
    ProductAnalytics::InitializeStackService.new(container: Project.first, current_user: User.first).execute
  • Validate that an instance of ProductAnalytics::InitializeAnalyticsWorker was enqueued in sidekiq.

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 #376678 (closed)

Edited by Dennis Tang

Merge request reports