Capture traces

This commit is contained in:
2024-01-25 14:46:43 +08:00
parent b906edc022
commit 4bdddf72e9
7 changed files with 69 additions and 4 deletions

10
pkg/sideload/metrics.go Normal file
View File

@ -0,0 +1,10 @@
package sideload
import (
"code.smartsheep.studio/goatworks/roadsign/pkg/navi"
"github.com/gofiber/fiber/v2"
)
func getTraces(c *fiber.Ctx) error {
return c.JSON(navi.R.Traces)
}

View File

@ -53,6 +53,7 @@ func InitSideload() *fiber.App {
cgi := app.Group("/cgi").Name("CGI")
{
cgi.Get("/metadata", getMetadata)
cgi.Get("/traces", getTraces)
cgi.Get("/statistics", getStatistics)
cgi.Get("/sites", getRegions)
cgi.Get("/sites/cfg/:id", getRegionConfig)