Skip to content

Move "Custom Metrics" feature into GitLab Core

This is an implementation issue to move our custom metrics within the Monitor stage into Core

This should have a sperate MR to update our documentation as well

Testability and Availability

Migration of existing e2e test should take place within the same scheduled milestone, there is a FE dependency.

Implementation

  1. !28527 (merged) - Removes license checks.

  2. !28523 (merged) - Moves custom metrics update/delete services out of EE.

  3. !28452 (merged) - Moves metrics controller endpoints out of EE.

  4. !28813 (merged) - Moves custom metrics related helpers out of EE.

  5. !28648 (closed) - Moves custom metrics frontend code out of EE.

  6. !28906 (merged) moves custom metrics Vue files into Core (app/assets/javascripts/custom_metrics/).

  7. !28912 (merged) moves custom metrics new/edit javascript files (app/assets/javascripts/pages/projects/prometheus/metrics/).

  8. !28919 (merged) moves custom metrics partial and ee/app/assets/javascripts/prometheus_metrics files.

Manual testing:

Perform the testing with the EE product as well as CE.

  1. To test as EE, use a normal GitLab/GDK installation.

  2. To test as CE, remove the ee folder from your Gitlab/GDK installation. You can simply rename the folder to something like ee_ignore.

    mv ee ee_ignore

Prerequisites:
Have a project with Prometheus available on your local Gitlab/GDK. You can clone https://gitlab.com/joshlambert/autodevops-deploy and use it.

Create custom metric

  1. Go to project settings > Integrations > Prometheus.

  2. Create a custom metric.

    You can use a simple query like up. Fill dummy data into the other fields.

Edit custom metric

  1. Go to project settings > Integrations > Prometheus.

  2. Edit an existing custom metric.

    Change any field and verify that the field got saved.

Check that custom metric shows up on metrics dashboard

  1. Go to Operations > Metrics.
  2. Check that an existing custom metric shows up.

Deleting custom metric

  1. Go to project settings > Integrations > Prometheus.
  2. Delete an existing custom metric.
Edited by Reuben Pereira