Add support for snowplow PA configurator
What does this MR do and why?
Overview
- Adds changes required to replace Jitsu with our in-house configurator and snowplow for event ingestion in groupproduct analytics.
Database changes
- Adds new application setting
product_analytics_configurator_base_uri
to store the base URI for the configurator service. - Adds a new
project_setting
fieldproduct_analytics_instrumentation_key
to store the instrumentation key.
Backend changes
- Adds a new feature flag to switch between the existing Jitsu-based stack, and the new snowplow one. This is off by default.
- Adds a new background worker to setup a stack using the new configurator.
- Adds all required specs.
Reproduction steps
- Enable the feature flag:
Feature.enable(:product_analytics_snowplow_support)
- Ensure that you are running the groupproduct analytics devkit using snowplow. Instructions can be found here: https://gitlab.com/gitlab-org/analytics-section/product-analytics/devkit#snowplow-instead-of-jitsu-work-in-progress
- As an instance admin, go to Admin -> Settings -> Product Analytics and enter the configurator URL. By default this will be
http://test:test@localhost:4567
.- If you haven't used the product analytics features in the past, you'll need to enter some values in to the other fields to pass validation. We'll be removing those with the flag removal shortly.
- In a project where you are a maintainer or above, execute the
ProjectInitializeProductAnalytics
GraphQL mutation. - Assert that a background job is triggered of class
ProductAnalytics::InitializeSnowplowProductAnalyticsWorker
and notProductAnalytics::InitializeAnalyticsWorker
. - Assert that the value of
project.project_setting.product_analytics_instrumentation_key
has been correct filled.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots
-
I have evaluated the MR acceptance checklist for this MR.
Related to #398253 (closed)
Edited by Max Woolf