feat: prometheus

This commit is contained in:
2025-12-14 14:11:33 +08:00
parent 31b9fb5d45
commit a9d2f05562
10 changed files with 162 additions and 132 deletions

View File

@@ -6,7 +6,9 @@ import (
"nysoure/server/middleware"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/adaptor"
"github.com/gofiber/fiber/v3/middleware/logger"
prom "github.com/prometheus/client_golang/prometheus/promhttp"
)
func main() {
@@ -29,6 +31,8 @@ func main() {
app.Use(middleware.FrontendMiddleware)
app.Get("/metrics", adaptor.HTTPHandler(prom.Handler()))
apiG := app.Group("/api")
{
api.AddUserRoutes(apiG)