Create new Service Ping metrics to track CI Leading Indicators
Summary
With the help of @jreporter, we defined Product Health Indicators for CI. For some of these indicators, there is no existing Service Ping metric. We need the help of the engineering team to create these metrics to support tracking CI Product Adoption.
Requested Metrics
-
Implemented in !163352 (merged) Number of repos running CI jobs (7d, 28d, All-time)
-
Implementation: Emit an event with
project_idwhen a pipeline runs
-
Implementation: Emit an event with
-
Implemented in !163352 (merged) Number of projects with a gitlab-ci.yml file populated (current number as of ping)
-
Implementation: Emit an event when a pipeline runs with
project_idin the event andconfig_sourceandsourceas additional properties (one aslabel, the other asproperty). The metric is a unique counter byproject.idwith afilterrestricting toconfig_source == repository_source. Might be able to re-use thecreate_ci_internal_pipelineevent by adding an additional property.
-
Implementation: Emit an event when a pipeline runs with
- Number of commits to configuration file (28d, All-time)
-
Needs clarification. Should probably be changed to number of pushes to the default branch modifying the CI configuration file. This can be built by emitting an event in the branch hooks of
PostReceivewhen the push is to the default branch and the object id of the CI configuration file is different between the new and old commit SHA for the branch.
-
Needs clarification. Should probably be changed to number of pushes to the default branch modifying the CI configuration file. This can be built by emitting an event in the branch hooks of
-
Implemented in !163352 (merged) Number of pipelines from CI files in repository (28d;
counts.ci_pipeline_config_repositoryis the all-time equivalent)- Implementation: A different aggregate on the same event as number 2
-
Implemented in !163352 (merged) Number of pipelines run using schedules (28d;
counts.ci_pipeline_schedulesis the all-time equivalent)-
Implementation: A different aggregate on the same event again, with a filter on
source
-
Implementation: A different aggregate on the same event again, with a filter on
- Number of passing pipelines (28d, All-time)
-
Implementation: New event, emit event when a non-external pipeline enters a finished state, with
statusas an additional property. Aggregate on the status.
-
Implementation: New event, emit event when a non-external pipeline enters a finished state, with
-
Implemented in !163352 (merged) Total pipelines run (28d, All-time)
- Needs clarification: If it's the number of completed pipelines, then re-use event from 6. Otherwise, if it's the number of created pipelines, re-use event from 2.
Implementation notes
- Follow the docs for defining events and defining metrics
- Use the additional properties
labelandpropertyfor filtering when defining metrics - Consider re-using the event
create_ci_internal_pipelinewhere appropriate
Edited by Sebastian Rehm