1
0

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

@ -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()))
}