Use snowplow to collect CI Build exit codes
Proposal
We do not currently persist exit codes for ci_builds after the build has finished executing. We do some simple comparison against allow_failure:exit_codes to check build status but there is value in tracking enumerations of non-zero exit codes for our templated CI jobs.
Metrics
The follow minimal information could be sent for each event:
build name-
build report type(s)(to allow slicing failures by job type; i.e.reports:sastorreports:coverage) exit code
Using ::Gitlab::Tracking.event with a custom event schema that would need to be defined in https://gitlab.com/gitlab-org/iglu.
Links
Usecase
Within devopssecure we have dozens of scanning jobs and different exit codes can point to failure commonalities that can be useful for metrics; i.e. "build failed to compile" vs "no compatible project found".
Edited by Lucas Charles