From 36b724b97bac0533452a68800beaaa632174bfe6 Mon Sep 17 00:00:00 2001 From: wolter <11@gmail> Date: Fri, 4 Jul 2025 09:43:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0pprof?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/routes/route.go | 4 ++++ 1 file changed, 4 insertions(+) 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 {