Skip to content

Commit

Permalink
admin: Add optional /debug/pprof/profile endpoint (#2516)
Browse files Browse the repository at this point in the history
This change introduces a new, optional /debug/pprof/profile.pb.gz
endpoint to the proxy's admin server. This endpoint is feature-gated
and, initially, it will not be included in release builds. It replicates
Go's /debug/pprof/profile, but it always returns gzipped protobuf (i.e.
as can be read by pprof pprofutils).

When the feature is enabled, profiling requests are only permitted over
the loopback interface.

The development Dockerfile is updated to prevent stripping debug
symbols when pprof is enabled so that the pprof data has useful names.

Co-authored-by: Eliza Weisman <[email protected]>
  • Loading branch information
olix0r and hawkw authored Nov 16, 2023
1 parent bf5cb67 commit 9f7e7ac
Show file tree
Hide file tree
Showing 15 changed files with 519 additions and 65 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ jobs:
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: just fetch
- run: just check --exclude=linkerd-meshtls-boring
- run: just check --exclude=linkerd-meshtls-boring --features=pprof
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"rust-analyzer.cargo.features": [],
"rust-analyzer.cargo.features": [
"pprof"
],
"files.insertFinalNewline": true
}
}
Loading

0 comments on commit 9f7e7ac

Please sign in to comment.