Fix "unexpected EOF" error when using metrics (#35)

This commit is contained in:
konrad 2018-12-17 12:22:06 +00:00 committed by Gitea
parent 777d63dff1
commit ec347a71bc
2 changed files with 6 additions and 1 deletions

View file

@ -238,7 +238,7 @@ Teams sind global, d.h. Ein Team kann mehrere Namespaces verwalten.
### Bugfixes
* [ ] Panic wenn mailer nicht erreichbar -> Als workaround mailer deaktivierbar machen, bzw keine mails verschicken
* [ ] "unexpected EOF"
* [x] "unexpected EOF"
### Docs

View file

@ -158,6 +158,11 @@ func RegisterRoutes(e *echo.Echo) {
}
}
// init active users, sometimes we'll have garbage from previous runs in redis instead
if err := metrics.SetActiveUsers([]*metrics.ActiveUser{}); err != nil {
log.Log.Fatalf("Could not set initial count for active users, error was %s", err)
}
a.GET("/metrics", echo.WrapHandler(promhttp.Handler()))
}