diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 7aedaeb5..ffc6889b 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -55,6 +55,8 @@ import ( _ "google.golang.org/grpc/health/grpc_health_v1" _ "google.golang.org/grpc/peer" _ "net" + _ "net/http" + _ "net/http/pprof" _ "net/url" _ "os" _ "os/signal" diff --git a/main.go b/main.go index 7e945672..7b07a05d 100644 --- a/main.go +++ b/main.go @@ -33,9 +33,15 @@ import ( "github.com/networkservicemesh/sdk/pkg/tools/log" "github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger" "github.com/networkservicemesh/sdk/pkg/tools/opentelemetry" + + "net/http" + _ "net/http/pprof" ) func main() { + go func() { + http.ListenAndServe("localhost:6060", nil) + }() // Setup context to catch signals ctx, cancel := signal.NotifyContext( context.Background(),