mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2026-07-01 22:45:17 +00:00
Add pprof profiling endpoints to the metrics server, gated behind a new EnablePprof config field. When enabled, standard Go pprof handlers are registered on the metrics port under /debug/pprof/. This also improves the metrics server setup: - Use dedicated http.ServeMux instead of DefaultServeMux - Move mux/handler setup outside the retry loop - Use http.Server with ReadHeaderTimeout for resource safety - Add graceful shutdown on context cancellation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Benjamin Pickard <bpickard@redhat.com>