Skip to content

Adding monthly metric for ci builds (28d)

Max Fan requested to merge 406807-ci-builds-28D-metric into master

What does this MR do and why?

Adding metrics to trace number of ci builds on a monthly basis

Screenshots or screen recordings

image

I only have 1 build that's not in the past 28 days, hence the difference by 1.

How to set up and validate locally

curl http://172.16.123.1:3000/api/v4/usage_data/metric_definitions | grep -C 10 "ci_builds"

Running GitlabServicePingWorker.new.perform('triggered_from_cron' => false) locally in rails console will populate RawUsageData in the database. Finding the counts shows you the screenshot above

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

Edited by Max Fan

Merge request reports