diff --git a/app/http/routes/route.go b/app/http/routes/route.go index 8208bf8..849c185 100644 --- a/app/http/routes/route.go +++ b/app/http/routes/route.go @@ -11,6 +11,7 @@ import ( "PaymentCenter/app/http/trace" "PaymentCenter/app/utils/metric" "PaymentCenter/config" + "github.com/gin-contrib/pprof" "github.com/gin-gonic/gin" "github.com/qit-team/snow-core/http/middleware" "github.com/qit-team/snow-core/log/logger" @@ -32,6 +33,9 @@ func RegisterRoute(router *gin.Engine) { }) } + //pprof + pprof.Register(router, "/pay/pprof") + if len(config.GetConf().SkyWalkingOapServer) > 0 && config.IsEnvEqual(config.ProdEnv) { err := trace.InitTracer(config.GetConf().ServiceName, config.GetConf().SkyWalkingOapServer) if err != nil {