Expose net/http/pprof handlers under /api/debug/pprof/* when the new

enablePprofEndpoint (JSON) / enable_pprof_endpoint (YAML) config option
is true. The endpoint is disabled by default.
This commit is contained in:
James Munson authored and André Roth committed 2026-11-02 15:14:35 +01:00
1 parent eaf9453897
commit 2d72d1f0d5
11 files changed
+341

No files matched your search

+1
View File
@@ -37,6 +37,7 @@ type ConfigStructure struct { // nolint: maligned
ServeInAPIMode bool `json:"serveInAPIMode" yaml:"serve_in_api_mode"`
EnableMetricsEndpoint bool `json:"enableMetricsEndpoint" yaml:"enable_metrics_endpoint"`
EnableSwaggerEndpoint bool `json:"enableSwaggerEndpoint" yaml:"enable_swagger_endpoint"`
EnablePprofEndpoint bool `json:"enablePprofEndpoint" yaml:"enable_pprof_endpoint"`
AsyncAPI bool `json:"AsyncAPI" yaml:"async_api"` // OBSOLETE
// Database
+3
View File
@@ -95,6 +95,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
"serveInAPIMode": false,
"enableMetricsEndpoint": false,
"enableSwaggerEndpoint": false,
"enablePprofEndpoint": false,
"AsyncAPI": false,
"databaseBackend": {
"type": "",
@@ -291,6 +292,7 @@ func (s *ConfigSuite) TestSaveYAML2Config(c *C) {
"serve_in_api_mode: false\n"+
"enable_metrics_endpoint: false\n"+
"enable_swagger_endpoint: false\n"+
"enable_pprof_endpoint: false\n"+
"async_api: false\n"+
"database_backend:\n"+
" type: \"\"\n"+
@@ -350,6 +352,7 @@ ppa_baseurl: http://ppa.launchpad.net
serve_in_api_mode: true
enable_metrics_endpoint: true
enable_swagger_endpoint: true
enable_pprof_endpoint: false
async_api: true
database_backend:
type: etcd