Skip to content

Draft: Add a GitLab API data source to analytics dashboard spike

Jiaan Louw requested to merge jlouw_pipeline_dashboard_spike into master

What does this MR do and why?

This MR is a spike to explore what how we could add a GitLab API resource (pipelines) as an analytics dashboard data source.

  • This MR adds a built-in Pipelines dashboard and two visualizations.
  • You can also use the built in visualizations to create a custom dashboard.
  • You can also use the gitlab_pipelines data source to create new visualizations. It accepts all GET params as query props.

Note: DO NOT MERGE!

Findings

  • 👍 Relatively easy to add a dedicated data source.
  • 👎 Querying the data is very limited and dependant on each API's available params.
  • 👎 Each API's params are essentially unique so users have a learn a new query language every time.
  • 👎 Performance will likely not be as fast as clickhouse.

Recommendations

GitLab API as a data source as the following potential uses:

  • 💡 Add select GitLab API resources as built in visualizations.
  • 💡 Add GitLab API resources as an overlay to supliment product analytics data. For example pipelines failed over page views per day.

A more forward looking recommendation is to track select GitLab actions as events, because:

  • It avoids the bespoke nature of GitLab API resources.
  • We can rely on existing product analytics (Cube) architecture.
  • Users don't have to learn a new querying langauge.
  • Potentially easier to integrate into tools like visualization designer.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Follow these instructions to setup Product Analytics in GDK.
  2. Onboard Product Analytics by setting up the feature at Project > Analytics > Analytics dashboards.
  3. Navigate back to Project > Analytics > Analytics dashboards and click on Pipelines.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports