Skip to content

Conversation

@Diaphteiros
Copy link
Contributor

What this PR does / why we need it:
The environment variable ENABLE_PROFILER can be set to true to expose pprof metrics for the MCPO.
The environment variable PROFILER_ADDRESS can be used to specify the address, it defaults to :8082 if not set.

To view the data:

  • Use kubectl port-forward pod/<pod-name> 8082 to reach the pprof endpoint from your local terminal.
  • curl -s "http://127.0.0.1:8082/debug/pprof/profile" > ./tmp/cpu-profile.out
  • go tool pprof -http=:8080 ./tmp/cpu-profile.out

@Diaphteiros Diaphteiros requested a review from robertgraeff April 4, 2025 08:39
@Diaphteiros Diaphteiros merged commit 40f733a into main Apr 4, 2025
6 checks passed
@Diaphteiros Diaphteiros deleted the pprof branch April 4, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants