Gitaly should expose the current version through a Prometheus metric

Raised as a result of https://gitlab.com/gitlab-com/infrastructure/issues/1777.

On startup, Gitaly sets a Prometheus gauge metric and sets the gauge value to 1.

The name of the metric would be fixed across all services, for example gitlab_build_info

In addition to the standard labels, like fqdn and job, the gauge would have an additional metric version.

This would make it very easy for anyone at GitLab to quickly query the versions of services and alerts to be setup to ensure that the correct version are running at all times.

Edited by Andrew Newdigate
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information