Skip to content

Decouple customizable dashboards from product analytics

What does this MR do and why?

Analytics dashboards can have the following dashboards

  • Built-in product analytics dashboards (behaviour and audience)
  • Value stream dashboards
  • Custom dashboards defined by user

Currently, all of these are controlled with product analytics feature flag. However, only built-in product analytics dashboards (behavior and audience) should depend on the feature flag value.

In addition, if the feature flag is enabled but onboarding is incomplete (no events in clickhouse), dashboards graphql response should not include product analytics dashboards.

This MR makes the above-mentioned decoupling.

There will be a follow up MR for the frontend changes.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

List query

FF enabled FF disabled
Screenshot_2023-10-11_at_21.57.00 Screenshot_2023-10-11_at_21.57.15

Fetch with slug value_stream_dashboard (FF flag enabled or disabled, both cases) Screenshot_2023-10-11_at_22.01.58

How to set up and validate locally

  1. Setup product analytics
  2. Go to GraphiQL explorer
query getAllProductAnalyticsDashboards($projectPath: ID!) {
  project(fullPath: $projectPath) {
    id
    customizableDashboards {
      nodes {
        title
      }
    }
  }
}

  1. It should return value stream dashboard
  2. Enable feature flag
Feature.enable(:product_analytics_dashboards, Project.find(project_id))
  1. Do the same graphQL query
  2. You should receive 'behavior', 'audience', and 'value stream analytics'.

MR acceptance checklist

Related to #424440 (closed)

Edited by Halil Coban

Merge request reports