Skip to content
Snippets Groups Projects
Commit d18af7e6 authored by Malte Bauch's avatar Malte Bauch
Browse files

linting

parent 1c4414fa
No related branches found
No related tags found
1 merge request!221Thesis mk
Pipeline #88945 passed
......@@ -59,5 +59,4 @@ func TestUseExistingConfig(t *testing.T) {
logrus.InfoLevel, LogLevel)
}
}
}
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment