diff --git a/config/config_test.go b/config/config_test.go index 6a1afccee6a9f8fd61f98ffc1d3ef6b87da0b856..482465dcc0f7df63b2d17096ccfb9fa58e1192d2 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -59,5 +59,4 @@ func TestUseExistingConfig(t *testing.T) { logrus.InfoLevel, LogLevel) } } - } diff --git a/metrics/prometheus.go b/metrics/prometheus.go index 73bc3ab5956dd897651f1db74c337beb91ecede2..d07cc48b5fe3b4dad65c5fa75fd9a90f8ae102e9 100644 --- a/metrics/prometheus.go +++ b/metrics/prometheus.go @@ -6,17 +6,23 @@ import ( "github.com/prometheus/client_golang/prometheus" ) +// nolint +// TODO: add description func StartHook(labels prometheus.Labels, counter *prometheus.CounterVec) time.Time { counter.With(labels).Inc() return time.Now() } +// nolint +// TODO: add description func FinishHook(labels prometheus.Labels, start time.Time, counter *prometheus.CounterVec, hist *prometheus.HistogramVec) { duration := time.Since(start) counter.With(labels).Add(duration.Seconds()) hist.With(labels).Observe(duration.Seconds()) } +// nolint +// TODO: add description func HandleError(labels prometheus.Labels, err error, counter *prometheus.CounterVec) error { errLabels := make(prometheus.Labels) for k, v := range labels {