Update individual dashboards to retrieve dashboards from backend
What does this MR do and why?
This MR updates the individual dashboards to retrieve the dashboard from the GraphQL endpoint. The GraphQL endpoint uses Snowplow rather than Jitsu, so we also have to make sure Snowplow is enabled using the product_analytics_snowplow_support
feature flag.
Specifically the changes made are:
- Updates individual dashboards to retrieve from GraphQL when Snowplow is enabled
- Updated specs to test with and without Snowplow enabled
This MR is part 2/2. The first MR Update dashboards listing to retrieve dashboard... (!121127 - merged) updates the listing to use the GraphQL endpoint.
Known issues
- Snowplow initialization can lead to an infinite loop if it errors.
-
ResizeObserver
error triggered by GitLab UI charts component. -
Audience
dashboard does not show data forBrowsers per User
andSessions per Browser
. -
Total Page Views
visualization onBehavior
dashboard throws an error due to the schema. -
Page Views Over Time
visualization onBehavior
dashboard throws an error due to the schema. - Single stat shows a blank visualization on empty array rather than a
0
Screenshots or screen recordings
Viewing dashboard with Jitsu
Screen_Recording_2023-05-18_at_15.53.36
Viewing dashboard with Snowplow
Screen_Recording_2023-05-18_at_16.45.50
How to set up and validate locally
Note: When setting up custom dashboards, the Jitsu implementation expects them to be located at .gitlab/dashboards/{dashboard}.yml
whilst the Snowplow implementation has changed the location to be .gitlab/analytics/dashboards/{dashboard}/{dashboard}.yaml
. When testing the custom dashboards, make sure to have dashboards set up for both locations.
- Follow these instructions to set up Product Analytics in your GDK.
- Set up three projects within the same group:
- One is for Jitsu set up
- One is for Snowplow set up
- One is to act as a custom dashboards project like in !112481 (merged)
- This requires this project to have a
main
branch and have that set to be the default branch for the project.
- This requires this project to have a
- Go through the set-up process described in the instructions for your Jitsu project.
- View the dashboard list at Project → Analytics → Dashboards.
- Select a
By GitLab
dashboard. - Verify the dashboard is shown correctly.
- Select a custom dashboard.
- Verify the dashboard is shown correctly.
- Enable the Snowplow flag by running the command:
echo "Feature.enable(:product_analytics_snowplow_support)" | rails c
. - Change to your Snowplow project and go through the set-up process again for Snowplow.
- Select a
By GitLab
dashboard. - Verify the dashboard is shown correctly.
- Select a custom dashboard.
- Verify the dashboard is shown correctly.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #382551 (closed)