Skip to content

Commit

Permalink
remove includeHeap
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnogo committed Oct 10, 2024
1 parent 890450d commit e7f0680
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit e7f0680

Please sign in to comment.