Skip to content

Validate and use collector host

Halil Coban requested to merge 389490-valiadate-and-use-collector-host into master

What does this MR do and why?

Application settings jitsu_host and collector_host should be stored separately. However, currently we only store jitsu_host and calculate the collector_host based on jitsu_host.

Recently, we added a new product_analytics_data_collector_host to application_settings table to store the above-mentioned collector host. We will backfill the values with a migration.

This current MR is

  • adding a validation on the presence and URL format.
  • adding a frontend input for the new field

You can see the release plan in this comment. In short:

  1. This MR will make sure newly updated/created records will have product_analytics_data_collector_host field set
  2. A follow up MR will backfill existing records which have NULL product_analytics_data_collector_host
  3. A final MR will cleanup ensure_product_analytics_data_collector_host! hook and get_collector_host helper.

Note: This feature is behind a feature flag and thus a changelog isn't added.

Screenshots or screen recordings

Onboarding page

Screenshot_2023-03-17_at_13.48.45

Admin product analytics settings page

Screenshot_2023-03-17_at_14.04.11

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Visit product analytics page
  2. You should be able to create and update collector host
  3. Visit product analytics dashboard
  4. Expand instrumentation details
  5. You should see correct collector host under SDK host field

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

Edited by Halil Coban

Merge request reports