Add dummy /metrics endpoint (#327)

This commit is contained in:
Thomas Miceli
2024-09-12 01:45:30 +02:00
committed by GitHub
parent df73b29fb1
commit 678fb9938c
3 changed files with 8 additions and 1 deletions

View File

@@ -23,3 +23,9 @@ func healthcheck(ctx echo.Context) error {
"time": time.Now().Format(time.RFC3339),
})
}
// metrics is a dummy handler to satisfy the /metrics endpoint (for Prometheus, Openmetrics, etc.)
// until we have a proper metrics endpoint
func metrics(ctx echo.Context) error {
return ctx.String(200, "")
}

View File

@@ -251,6 +251,7 @@ func NewServer(isDev bool, sessionsPath string) *Server {
g1.GET("/preview", preview, logged)
g1.GET("/healthcheck", healthcheck)
g1.GET("/metrics", metrics)
g1.GET("/register", register)
g1.POST("/register", processRegister)