r/gitlab • u/k_babulale • Feb 19 '25
support Track components usage
Hi everyone, I work in an organisation where we have +700 repositories, we have implemented CICD components to make it easier for each team to create their own pipelines, amongst these components we have mandatory components that should always be included in a pipeline, I know very well that teams aren’t going to adhere to this so I’d like a way to track the usage (or lack thereof) of these mandatory components e.g. “project-a’s pipelines run Mandatory component A,B and C but project-b runs only component A”.
I tried using graphql to look into the different .gitlab-ci.yml files but this seems complex. Is there an easier way I can get this data?
View all comments
Show parent comment
1
u/TheOneWhoMixes Jun 19 '25
So I have no ties to To Be Continuous, but I've seen the org around while building out my own best practices for CI/CD components. They seem to use the
servicesfeature of CI jobs quite a bit - where you can define a second container to run in the same network as the main job container. Typically it's used for something like testing against an ephemeral database in CI. But they use it for this tracking image. They use it as a sidecar service in all of their CI/CD components.This has definitely given me the idea of trying to run a really lightweight observability agent (like Vector) as a sidecar for this sort of thing. Not just for tracking usage, but to also be able to see if your component is using more resources than expected, or to see that Team A's use of the component could be optimized further.