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:
- extract generic handlers implementation for
GaugeVec,CounterVec, andHistogramVecinto thehandlerspackage - repurpose the
metricspackage to our abstraction over the prometheus library - move all the metrics declaration into the
mainpackage ( inmetrics.go)
Related to gitlab-com/gl-infra/delivery#1964 (closed)
Edited by Alessio Caiazza