Skip to content

Commit 53624a1

Browse files
authored
feat: enable pprof endpoint for orchestrator
1 parent 6c37a53 commit 53624a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/api/api.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212
"github.com/arduino/arduino-app-cli/internal/update"
1313

1414
dockerClient "github.com/docker/docker/client"
15+
16+
_ "net/http/pprof" //nolint:gosec // pprof import is safe for profiling endpoints
1517
)
1618

1719
//go:embed docs
@@ -27,6 +29,7 @@ func NewHTTPRouter(
2729
bricksIndex *bricksindex.BricksIndex,
2830
) http.Handler {
2931
mux := http.NewServeMux()
32+
mux.Handle("GET /debug/", http.DefaultServeMux) // pprof endpoints
3033

3134
mux.Handle("GET /v1/version", handlers.HandlerVersion(version))
3235
mux.Handle("GET /v1/config", handlers.HandleConfig())

0 commit comments

Comments
 (0)