metrics: extract metrics handlers into a reusable structs

What does this MR do?

Working on !1540 (merged) it was suggested to extract the refactoring into its own MR.

What is included in this MR:

  1. extract generic handlers implementation for GaugeVec, CounterVec, and HistogramVec into the handlers package
  2. repurpose the metrics package to our abstraction over the prometheus library
  3. move all the metrics declaration into the main package ( in metrics.go )

Related to gitlab-com/gl-infra/delivery#1964 (closed)

Edited by Alessio Caiazza

Merge request reports

Loading