Skip to content

Dont remove instrumentation key unnecessarily

What does this MR do and why?

Product analytics can be configured project level, meaning users can provide a product_analytics_configurator_connection_string different than their instance level product_analytics_instrumentation_key which is configured in admin settings.

When a project level product_analytics_configurator_connection_string is provided, we need to clear product_analytics_instrumentation_key as the previous one will become invalid. InitializeSnowplowProductAnalyticsWorker will set a new product_analytics_instrumentation_key after calling the new analytics configurator located at product_analytics_configurator_connection_string.

However, we should not clean up product_analytics_configurator_connection_string when users didn't provide a product_analytics_configurator_connection_string. Otherwise it causes their dashboards to not show up and go back to onboarding state.

Screenshots or screen recordings

Before After
Screenshot_2023-12-07_at_12.44.56 Screenshot_2023-12-07_at_12.43.47

How to set up and validate locally

  1. Set up product analytics. For more information on setting up product analytics locally, see this video walkthrough.
  2. Visit a project settings page -> Analytics -> Save the form without changing Snowplow configurator connection string
  3. Go to Analyze -> Analytics dashboards in the sidebar
  4. Your dashboards should still be visible

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

Edited by Halil Coban

Merge request reports