Report CI duration metric along with dimensional data
In gitlab-com/www-gitlab-com#4415 (closed), we were analyzing CI job duration by multiple dimensions (to understand our Cloud Spend better). It is not exactly easy at the moment to extract that data from the database.
Instead, we want to push the job duration along with relevant dimensional data to Prometheus for further reporting and monitoring.
Fact/Metric: per-job duration in seconds
- Project visibility (private, internal, public)
- Project id
- Plan used in project
- Flag to indicate if this CI job has run on GitLab Inc. owned infrastructure or somewhere else (private runner)
Depending on how we implement this with Prometheus, a histogram with project-counts and CI duration (per day) should work, too.