fix: 初验针对修改

This commit is contained in:
zxr
2026-09-09 16:45:01 +08:00
parent 38a86e1fd8
commit b0ffde3100
25 changed files with 1531 additions and 158 deletions

View File

@@ -4,18 +4,27 @@ import (
"fmt"
"git.apinb.com/bsm-sdk/core/middleware"
"git.apinb.com/ops/logs/internal/health"
"git.apinb.com/ops/logs/internal/logic/audit"
"git.apinb.com/ops/logs/internal/logic/controllers"
"git.apinb.com/ops/logs/internal/logic/otlp"
"git.apinb.com/ops/logs/internal/logic/ping"
"github.com/gin-gonic/gin"
)
func Register(srvKey string, engine *gin.Engine) {
v1 := fmt.Sprintf("/%s/%s", srvKey, "v1")
engine.GET("/ready", health.Ready)
anon := engine.Group(v1)
{
anon.GET("/ping/hello", ping.Hello)
anon.POST("/resource-events", controllers.ReceiveResourceEvent)
anon.POST("/otlp/v1/traces", otlp.ReceiveTraces)
anon.POST("/otlp/v1/logs", otlp.ReceiveLogs)
}
runtimeStatus := engine.Group(v1)
runtimeStatus.Use(middleware.JwtAuth(true))
runtimeStatus.GET("/runtime/status", health.Status)
api := engine.Group(v1)
api.Use(middleware.JwtAuth(true))
@@ -40,9 +49,10 @@ func Register(srvKey string, engine *gin.Engine) {
api.PUT("/trap-suppressions/:id", controllers.UpdateTrapShield)
api.DELETE("/trap-suppressions/:id", controllers.DeleteTrapShield)
api.POST("/resource-events", controllers.ReceiveResourceEvent)
api.GET("/entries", controllers.ListLogEvents)
api.GET("/traces", otlp.ListTraces)
api.GET("/traces/:trace_id", otlp.GetTrace)
api.GET("/service-dependencies", otlp.ListDependencies)
api.POST("/entries/:id/replay", controllers.ReplayLogEvent)
api.GET("/alert-outbox", controllers.ListAlertOutbox)
api.POST("/alert-outbox/:id/retry", controllers.RetryAlertOutbox)