WIP metrics

This commit is contained in:
binwiederhier 2023-03-06 22:16:10 -05:00
parent bc0e72e3ef
commit 2783a52cad
7 changed files with 489 additions and 2 deletions

View file

@ -83,6 +83,12 @@ func (s *Server) execManager() {
"emails_sent_failure": sentMailFailure,
}).
Info("Server stats")
if s.httpMetricsServer != nil {
metrics.messagesCached.Set(float64(messagesCached))
metrics.visitors.Set(float64(visitorsCount))
metrics.subscribers.Set(float64(subscribers))
metrics.topics.Set(float64(topicsCount))
}
}
func (s *Server) pruneVisitors() {