Improve metrics performance
This commit is contained in:
parent
28a5c1f7b2
commit
333444b4e1
3 changed files with 28 additions and 28 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Reference in a new issue