mirror of
https://github.com/elyby/accounts-profiles-endpoint.git
synced 2024-11-25 16:28:56 +05:30
Enable pprof to investigate CPU usage in production
This commit is contained in:
parent
ca840c1cc5
commit
ffd55e6512
1
go.mod
1
go.mod
@ -6,6 +6,7 @@ go 1.23.0
|
||||
require (
|
||||
github.com/etherlabsio/healthcheck/v2 v2.0.0
|
||||
github.com/getsentry/sentry-go v0.29.0
|
||||
github.com/gin-contrib/pprof v1.5.0
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/go-sql-driver/mysql v1.8.1
|
||||
github.com/spf13/viper v1.19.0
|
||||
|
2
go.sum
2
go.sum
@ -22,6 +22,8 @@ github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy
|
||||
github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s=
|
||||
github.com/getsentry/sentry-go v0.29.0 h1:YtWluuCFg9OfcqnaujpY918N/AhCCwarIDWOYSBAjCA=
|
||||
github.com/getsentry/sentry-go v0.29.0/go.mod h1:jhPesDAL0Q0W2+2YEuVOvdWmVtdsr1+jtBrlDEVWwLY=
|
||||
github.com/gin-contrib/pprof v1.5.0 h1:E/Oy7g+kNw94KfdCy3bZxQFtyDnAX2V7axRS7sNYVrU=
|
||||
github.com/gin-contrib/pprof v1.5.0/go.mod h1:GqFL6LerKoCQ/RSWnkYczkTJ+tOAUVN/8sbnEtaqOKs=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"github.com/etherlabsio/healthcheck/v2"
|
||||
"github.com/getsentry/sentry-go"
|
||||
sentrygin "github.com/getsentry/sentry-go/gin"
|
||||
"github.com/gin-contrib/pprof"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/multierr"
|
||||
|
||||
@ -53,6 +54,7 @@ func Serve() error {
|
||||
}
|
||||
|
||||
r := gin.Default()
|
||||
pprof.Register(r)
|
||||
r.Use(sentrygin.New(sentrygin.Options{Repanic: true}))
|
||||
r.Use(sentryLogging.ErrorMiddleware())
|
||||
r.Use(http.ErrorMiddleware())
|
||||
|
Loading…
Reference in New Issue
Block a user