mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
[debug] allow to expose activate via config (#1284)
This CL addresses issue #1177 introducing two new configuration params allowing to activate pprof. - `ATHENS_ENABLE_PPROF` - `ATHENS_PPROF_PORT` pprof won't be exposed by default.
This commit is contained in:
@@ -25,6 +25,8 @@ type Config struct {
|
||||
ProtocolWorkers int `validate:"required" envconfig:"ATHENS_PROTOCOL_WORKERS"`
|
||||
LogLevel string `validate:"required" envconfig:"ATHENS_LOG_LEVEL"`
|
||||
CloudRuntime string `validate:"required" envconfig:"ATHENS_CLOUD_RUNTIME"`
|
||||
EnablePprof bool `envconfig:"ATHENS_ENABLE_PPROF"`
|
||||
PprofPort string `envconfig:"ATHENS_PPROF_PORT"`
|
||||
FilterFile string `envconfig:"ATHENS_FILTER_FILE"`
|
||||
TraceExporterURL string `envconfig:"ATHENS_TRACE_EXPORTER_URL"`
|
||||
TraceExporter string `envconfig:"ATHENS_TRACE_EXPORTER"`
|
||||
@@ -78,6 +80,8 @@ func defaultConfig() *Config {
|
||||
ProtocolWorkers: 30,
|
||||
LogLevel: "debug",
|
||||
CloudRuntime: "none",
|
||||
EnablePprof: false,
|
||||
PprofPort: ":3001",
|
||||
StatsExporter: "prometheus",
|
||||
TimeoutConf: TimeoutConf{Timeout: 300},
|
||||
StorageType: "memory",
|
||||
|
||||
Reference in New Issue
Block a user