Skip to content

Add labkit monitoring for build metrics

Zeger-Jan van de Weg requested to merge zj-gitlab-build-info into master

Labkit monitoring exposes a metric I wanted to add, gitlab_build_info. This will set a gauge to the current version and build time, and as such we can measure how fast deploys are and when the last deploy happened.

The -version flag is not affected, the output of the log slightly changed:

Old

~/src/gitlab.com/gitlab-org/gitlab-workhorse master
$ ./gitlab-workhorse
INFO[0000] Starting                                      version="gitlab-workhorse v8.15.0-4-g6240978-20191119.135549"
^C

~/src/gitlab.com/gitlab-org/gitlab-workhorse master 34s
$ ./gitlab-workhorse -version
gitlab-workhorse v8.15.0-4-g6240978-20191119.135549

New

~/src/gitlab.com/gitlab-org/gitlab-workhorse zj-gitlab-build-info
$ ./gitlab-workhorse
INFO[0000] Starting                                      build_time=20191119.140155 version=v8.15.0-5-ge6e9bcd
^C

~/src/gitlab.com/gitlab-org/gitlab-workhorse zj-gitlab-build-info
$ ./gitlab-workhorse -version
gitlab-workhorse v8.15.0-5-ge6e9bcd-20191119.140155
Edited by Zeger-Jan van de Weg

Merge request reports