Metrics for Flux GitOps usage with GitLab
Problem to solve
As a product team, in order to measure our performance, we want to know how and how much are our features used.
What questions do we want to answer with the data?
- how often are projects deployed with Flux?
- I imagine a histogram that shows the distribution of the number of deployments per project per month if this is feasible to collect from Self-Managed users.
- We can make higher level aggregations from such data, like the total number of deployments.
- In this case a deployment means a successful Flux sync event of a new sha of a
GitRepository/OCIRepository/HelmRepository.
- how many GitLab projects are deployed with Flux?
- As we indirectly deploy a container, it would be great to learn about the referenced projects. As this is likely not possible, knowing the number of resources watched by
GitRepository/OCIRepository/HelmRepositoryis fine. - We can start with
GitRepository. It would be great to have at least a rough idea of the work needed measureOCIRepositoryandHelmRepositoryusage, in this order.
- As we indirectly deploy a container, it would be great to learn about the referenced projects. As this is likely not possible, knowing the number of resources watched by
- how many Flux resources rely on the same
GitRepository/OCIRepository/HelmRepositoryhosted by GitLab?- As we indirectly deploy a container, it would be great to learn about the referenced projects. as this is likely not possible, we might be able to get a good proxy by counting the dependent resources.
- This data might be useful in the future for building UIs.
- how often do deployments fail and in what circumstances?
- Knowing this data can help us on the longer term to support our users with early warnings about typical failures.
The above list shows the prioritisation as well in an ideal world. We can skip priorities if some of it is not feasible.
Proposal
Track how many times KAS notifies agentks about GitLab repository updates. The KAS notification was built as part of `agentk` should notify Flux about new commits w... (#392852 - closed)
Previous proposal
### For pull-based deployments- Distinct user count of users who made commits to manifest files (the files watched under the
globconfiguration in the agent config)
Definition of done
-
Usage ping metric installed for pull-based gitops deployments -
Document usage ping changes if necessary
Edited by Viktor Nagy (GitLab)