How to gather GitLab's top DevOps tooling metrics?

I have been looking into gathering some useful DevOps metrics for projects in our self-hosted GitLab instance. I came across a blog post by GitLab, The top DevOps tooling metrics and targets at GitLab | GitLab, which goes over some of the metrics that I thought would be perfect to track.

I have been trying to comb through GitLab’s handbook and linked GitLab issues within the handbooks, but I couldn’t really understand how the metrics were obtained and tracked. I was wondering if people knew how metrics like the ones listed were obtained from a GitLab instance.

Metrics covered in the blog that I’m particularly interested in:

  • Master pipeline stability
  • Time to First Failure
  • Merge request pipeline duration
  • MR pipeline costs

I didn’t find any documentation on how these metrics could be obtained with out-of-the-box features. I’m assuming there’s custom scripts or tools used for gathering them, and I’m hoping people can point me in the right direction for how it can be done.