feat(pprof): add support for configurable pprof HTTP debug server

- Introduced a new `pprof` server to enable/debug HTTP profiling.
- Added configuration options for enabling/disabling and specifying the server address.
- Integrated pprof server lifecycle management with `Service`.

#1287
This commit is contained in:
Luis Pater
2026-02-04 02:39:26 +08:00
parent 5b23fc570c
commit 1548c567ab
5 changed files with 209 additions and 1 deletions

View File

@@ -40,6 +40,11 @@ api-keys:
# Enable debug logging
debug: false
# Enable pprof HTTP debug server (host:port). Keep it bound to localhost for safety.
pprof:
enable: false
addr: "127.0.0.1:8316"
# When true, disable high-overhead HTTP middleware features to reduce per-request memory usage under high concurrency.
commercial-mode: false