Skip to content

feat: Report build completed metrics on Ci::Build finished

Lucas Charles requested to merge add-artifact-builds-metrics into master

What does this MR do and why?

We previously did not have clear observability in place for tracking success metrics around report-type CI builds. This MR adds a metrics counter and export for individual metrics related to completed report builds, grouped by status.

While not directly related, this change comes out of incident gitlab-com/gl-infra/production#6313 (closed) where we should take steps to improve the observability around build completion rates per report type.

Eventually breaking this down by scanner would be ideal but that's a future improvement.

Note this generic counter is subject to the same limitations as #329114 but provides a more generic baseline to iterate against.

feature flag rollout issue: #369500 (closed)

Screenshots or screen recordings

Screen_Shot_2022-08-01_at_2.28.46_PM

How to set up and validate locally

  1. export GITLAB_SIMULATE_SAAS=1 > GDK_ROOT/env.runit per https://docs.gitlab.com/ee/development/ee_features.html#act-as-saas
  2. Run pipeline containing artifact reports
  3. Visit /-/metrics
  4. Note counter values for matching report types

MR acceptance checklist

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

Edited by Lucas Charles

Merge request reports