Skip to content

Instrument GitLab Shell and log metrics data to a file

We need to start instrumenting the code so we know where time is being spent. The easiest way is to essentially measure blocks (with a name) and log the metrics to a file. This allows us to scrape the data using mtail (as discussed in https://gitlab.com/gitlab-com/infrastructure/issues/502).

Data to measure:

  • CPU time used
  • Real time used
  • call count

See the GitLab CE code for more information on how this is currently done.