aboutsummaryrefslogtreecommitdiff
path: root/middleware/prometheus/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/prometheus/metrics.go')
-rw-r--r--middleware/prometheus/metrics.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/middleware/prometheus/metrics.go b/middleware/prometheus/metrics.go
index 00db6e791..b47d06ff8 100644
--- a/middleware/prometheus/metrics.go
+++ b/middleware/prometheus/metrics.go
@@ -1,7 +1,7 @@
package metrics
import (
- "fmt"
+ "log"
"net/http"
"sync"
@@ -39,8 +39,9 @@ func (m *Metrics) Start() error {
http.Handle(path, prometheus.Handler())
go func() {
- // TODO(miek): Logging here?
- fmt.Errorf("%s", http.ListenAndServe(m.Addr, nil))
+ if err := http.ListenAndServe(m.Addr, nil); err != nil {
+ log.Printf("[ERROR] Failed to start prometheus handler: %s", err)
+ }
}()
})
return nil