mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-09 02:37:16 -04:00
Merge pull request #2952 from owncloud/tracing-config-fix
Tracing config fix
This commit is contained in:
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
GRPC GRPC `ocisConfig:"grpc"`
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
6
changelog/unreleased/fix-tracing-config.md
Normal file
6
changelog/unreleased/fix-tracing-config.md
Normal file
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix the default tracing provider
|
||||
|
||||
We've fixed the default tracing provider which was no longer configured after [owncloud/ocis#2818](https://github.com/owncloud/ocis/pull/2818).
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2952
|
||||
https://github.com/owncloud/ocis/pull/2818
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: "jaeger"
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
Ldap Ldap `ocisConfig:"ldap"`
|
||||
Ldaps Ldaps `ocisConfig:"ldaps"`
|
||||
|
||||
@@ -11,12 +11,6 @@ func DefaultConfig() *Config {
|
||||
Debug: Debug{
|
||||
Addr: "127.0.0.1:9129",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
Service: Service{
|
||||
Name: "glauth",
|
||||
},
|
||||
|
||||
@@ -24,9 +24,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -16,12 +16,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "graph-explorer",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
GraphExplorer: GraphExplorer{
|
||||
ClientID: "ocis-explorer.js",
|
||||
Issuer: "https://localhost:9200",
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -14,12 +14,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "graph",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
Reva: Reva{
|
||||
Address: "127.0.0.1:9142",
|
||||
},
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -22,12 +22,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "idp",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
Asset: Asset{},
|
||||
IDP: Settings{
|
||||
Iss: "https://localhost:9200",
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -23,7 +23,7 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ var Propagator = propagation.NewCompositeTextMapPropagator(
|
||||
// GetTraceProvider returns a configured open-telemetry trace provider.
|
||||
func GetTraceProvider(agentEndpoint, collectorEndpoint, serviceName, traceType string) (*sdktrace.TracerProvider, error) {
|
||||
switch t := traceType; t {
|
||||
case "jaeger":
|
||||
case "", "jaeger":
|
||||
var (
|
||||
exp *jaeger.Exporter
|
||||
err error
|
||||
@@ -66,7 +66,7 @@ func GetTraceProvider(agentEndpoint, collectorEndpoint, serviceName, traceType s
|
||||
case "zipkin":
|
||||
fallthrough
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid trace configuration")
|
||||
return nil, fmt.Errorf("unknown trace type %s", traceType)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -22,12 +22,7 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "ocs",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
|
||||
TokenManager: TokenManager{
|
||||
JWTSecret: "Pive-Fumkiu4",
|
||||
},
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -23,12 +23,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "proxy",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
OIDC: OIDC{
|
||||
Issuer: "https://localhost:9200",
|
||||
Insecure: true,
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -216,7 +216,7 @@ func testConfig(policy []config.Policy) *config.Config {
|
||||
Log: &config.Log{},
|
||||
Debug: config.Debug{},
|
||||
HTTP: config.HTTP{},
|
||||
Tracing: config.Tracing{},
|
||||
Tracing: &config.Tracing{},
|
||||
Policies: policy,
|
||||
OIDC: config.OIDC{},
|
||||
PolicySelector: nil,
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
GRPC GRPC `ocisConfig:"grpc"`
|
||||
|
||||
@@ -33,12 +33,6 @@ func DefaultConfig() *Config {
|
||||
Addr: "127.0.0.1:9191",
|
||||
Namespace: "com.owncloud.api",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
DataPath: path.Join(defaults.BaseDataPath(), "settings"),
|
||||
Asset: Asset{
|
||||
Path: "",
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -423,7 +423,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config, storageExtension string) er
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
GRPC GRPC `ocisConfig:"grpc"`
|
||||
|
||||
|
||||
@@ -21,12 +21,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "store",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
Datapath: path.Join(defaults.BaseDataPath(), "store"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
GRPC GRPC `ocisConfig:"grpc"`
|
||||
|
||||
|
||||
@@ -21,12 +21,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "thumbnails",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
Thumbnail: Thumbnail{
|
||||
Resolutions: []string{"16x16", "32x32", "64x64", "128x128", "1920x1080", "3840x2160", "7680x4320"},
|
||||
FileSystemStorage: FileSystemStorage{
|
||||
|
||||
@@ -24,9 +24,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -17,12 +17,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "web",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
Asset: Asset{
|
||||
Path: "",
|
||||
},
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
@@ -12,9 +12,9 @@ type Config struct {
|
||||
|
||||
Service Service
|
||||
|
||||
Tracing Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Tracing *Tracing `ocisConfig:"tracing"`
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
|
||||
HTTP HTTP `ocisConfig:"http"`
|
||||
|
||||
|
||||
@@ -22,12 +22,6 @@ func DefaultConfig() *Config {
|
||||
Service: Service{
|
||||
Name: "webdav",
|
||||
},
|
||||
Tracing: Tracing{
|
||||
Enabled: false,
|
||||
Type: "jaeger",
|
||||
Endpoint: "",
|
||||
Collector: "",
|
||||
},
|
||||
OcisPublicURL: "https://127.0.0.1:9200",
|
||||
WebdavNamespace: "/users/{{.Id.OpaqueId}}",
|
||||
RevaGateway: "127.0.0.1:9142",
|
||||
|
||||
@@ -25,9 +25,20 @@ func ParseConfig(cfg *config.Config) error {
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil && cfg.Commons == nil {
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
|
||||
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{}
|
||||
}
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user