aboutsummaryrefslogtreecommitdiff
path: root/backend/cmd/server
diff options
context:
space:
mode:
Diffstat (limited to 'backend/cmd/server')
-rw-r--r--backend/cmd/server/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go
index f734885..0093596 100644
--- a/backend/cmd/server/main.go
+++ b/backend/cmd/server/main.go
@@ -16,6 +16,7 @@ import (
"yaum/internal/api"
"yaum/internal/config"
"yaum/internal/monitor"
+ "yaum/internal/servermetrics"
"yaum/internal/sse"
"yaum/internal/store"
)
@@ -77,7 +78,10 @@ func main() {
}
worker.WithSMTP(smtpCfg)
}
- handler := api.NewHandler(st, int(cfg.CheckTimeout().Seconds()))
+ metricsCollector := servermetrics.New(".")
+ go metricsCollector.Start(ctx)
+
+ handler := api.NewHandler(st, int(cfg.CheckTimeout().Seconds()), metricsCollector)
streamHandler := api.NewStreamHandler(broadcaster)
authHandler := api.NewAuthHandler(
cfg.AdminUsername(),