Skip to content

Add the first cube line chart visualization to product analytics

Jiaan Louw requested to merge 377708-add-cube-line-chart into master

What does this MR do and why?

This MR builds upon the changes from Introduce visualizations to product analytics d... (!103186 - merged) to add the first cube line chart visualization.

Since this is a the first of its type there is a lot of code added. Including adding two new dependancies for @cubejs-client which we need to communicate with Cubejs.

I've split the changes up into several smaller commits in an attempt to make this MR easier to review.

Related issue Cube Query Rendering Widget - Line Chart (#377708 - closed).

Screenshots or screen recordings

image

How to set up and validate locally

  1. You need to setup the product analytics devkit if you haven't already done so. https://gitlab.com/gitlab-org/analytics-section/product-analytics/devkit
  2. Enable the feature flag: echo "Feature.enable(:product_analytics_internal_preview)" | rails c.
  3. Visit the dashboard page of any project and validate that it renders: http://localhost:3000/gitlab-org/gitlab-shell/-/product_analytics/dashboards/

This will show an empty dashboard if you have no events in clickhouse. To generate events:

  1. You can use a browser extension like tapermonkey + this userscript to generate events.
    • Using the userscript above you need to change the host to your devkit's Jitsu URL and use your Jitsu's client key.

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

Edited by Jiaan Louw

Merge request reports