Merge pull request #2952 from owncloud/tracing-config-fix

Tracing config fix
This commit is contained in:
Willy Kloucek
2022-01-13 08:42:54 +01:00
committed by GitHub
47 changed files with 199 additions and 119 deletions

View File

@@ -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"`

View File

@@ -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 {

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"`

View File

@@ -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",
},

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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",

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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",
},

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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",

View File

@@ -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 {

View File

@@ -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{}
}

View File

@@ -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)
}
}

View File

@@ -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"`

View File

@@ -22,12 +22,7 @@ func DefaultConfig() *Config {
Service: Service{
Name: "ocs",
},
Tracing: Tracing{
Enabled: false,
Type: "jaeger",
Endpoint: "",
Collector: "",
},
TokenManager: TokenManager{
JWTSecret: "Pive-Fumkiu4",
},

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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,

View File

@@ -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 {

View File

@@ -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,

View File

@@ -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"`

View File

@@ -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: "",

View File

@@ -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 {

View File

@@ -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{}
}

View File

@@ -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"`

View File

@@ -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"),
}
}

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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{

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -17,12 +17,6 @@ func DefaultConfig() *Config {
Service: Service{
Name: "web",
},
Tracing: Tracing{
Enabled: false,
Type: "jaeger",
Endpoint: "",
Collector: "",
},
Asset: Asset{
Path: "",
},

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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",

View File

@@ -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 {