1
0

Improve metrics performance

This commit is contained in:
kolaente
2020-05-15 14:42:32 +02:00
parent 28a5c1f7b2
commit 333444b4e1
3 changed files with 28 additions and 28 deletions

View File

@ -48,6 +48,11 @@ const (
func InitMetrics() {
r = red.GetRedis()
// init active users, sometimes we'll have garbage from previous runs in redis instead
if err := PushActiveUsers(); err != nil {
log.Fatalf("Could not set initial count for active users, error was %s", err)
}
// Register total list count metric
promauto.NewGaugeFunc(prometheus.GaugeOpts{
Name: "vikunja_list_count",