add debug to postprocessing

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2023-05-02 16:59:13 +02:00
parent b20d65177f
commit 624483a051
5 changed files with 128 additions and 34 deletions

View File

@@ -15,6 +15,12 @@ func FullDefaultConfig() *config.Config {
// DefaultConfig is the default configuration
func DefaultConfig() *config.Config {
return &config.Config{
Debug: config.Debug{
Addr: "127.0.0.1:9255",
Token: "",
Pprof: false,
Zpages: false,
},
Service: config.Service{
Name: "postprocessing",
},
@@ -40,6 +46,18 @@ func EnsureDefaults(cfg *config.Config) {
} else if cfg.Log == nil {
cfg.Log = &config.Log{}
}
// provide with defaults for shared tracing, since we need a valid destination address for "envdecode".
if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
cfg.Tracing = &config.Tracing{
Enabled: cfg.Commons.Tracing.Enabled,
Type: cfg.Commons.Tracing.Type,
Endpoint: cfg.Commons.Tracing.Endpoint,
Collector: cfg.Commons.Tracing.Collector,
}
} else if cfg.Tracing == nil {
cfg.Tracing = &config.Tracing{}
}
}
// Sanitize does nothing atm