Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heap #15540

Closed
wants to merge 2 commits into from
Closed

heap #15540

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions core/web/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin"
"go.opentelemetry.io/otel"

"github.com/smartcontractkit/chainlink/v2/core/build"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
"github.com/smartcontractkit/chainlink/v2/core/web/auth"
Expand Down Expand Up @@ -178,7 +177,7 @@ func debugRoutes(app chainlink.Application, r *gin.RouterGroup) {
group.GET("/vars", expvar.Handler())
}

func metricRoutes(r *gin.RouterGroup, includeHeap bool) {
func metricRoutes(r *gin.RouterGroup) {
pprofGroup := r.Group("/debug/pprof")
pprofGroup.GET("/", ginHandlerFromHTTP(pprof.Index))
pprofGroup.GET("/cmdline", ginHandlerFromHTTP(pprof.Cmdline))
Expand All @@ -189,9 +188,7 @@ func metricRoutes(r *gin.RouterGroup, includeHeap bool) {
pprofGroup.GET("/allocs", ginHandlerFromHTTP(pprof.Handler("allocs").ServeHTTP))
pprofGroup.GET("/block", ginHandlerFromHTTP(pprof.Handler("block").ServeHTTP))
pprofGroup.GET("/goroutine", ginHandlerFromHTTP(pprof.Handler("goroutine").ServeHTTP))
if includeHeap {
pprofGroup.GET("/heap", ginHandlerFromHTTP(pprof.Handler("heap").ServeHTTP))
}
pprofGroup.GET("/heap", ginHandlerFromHTTP(pprof.Handler("heap").ServeHTTP))
pprofGroup.GET("/mutex", ginHandlerFromHTTP(pprof.Handler("mutex").ServeHTTP))
pprofGroup.GET("/threadcreate", ginHandlerFromHTTP(pprof.Handler("threadcreate").ServeHTTP))
}
Expand Down Expand Up @@ -430,7 +427,7 @@ func v2Routes(app chainlink.Application, r *gin.RouterGroup) {
authv2.GET("/build_info", buildInfo.Show)

// Debug routes accessible via authentication
metricRoutes(authv2, build.IsDev())
metricRoutes(authv2)
}

ping := PingController{app}
Expand Down
Loading