diff --git a/services/auth-api/pkg/command/server.go b/services/auth-api/pkg/command/server.go index 52c2e20df7..2e4812b203 100644 --- a/services/auth-api/pkg/command/server.go +++ b/services/auth-api/pkg/command/server.go @@ -6,7 +6,6 @@ import ( "github.com/oklog/run" "github.com/opencloud-eu/opencloud/pkg/config/configlog" - "github.com/opencloud-eu/opencloud/pkg/tracing" "github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/services/auth-api/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-api/pkg/config/parser" @@ -29,11 +28,6 @@ func Server(cfg *config.Config) *cli.Command { Action: func(c *cli.Context) error { logger := logging.Configure(cfg.Service.Name, cfg.Log) - traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name) - if err != nil { - return err - } - var ( gr = run.Group{} ctx, cancel = context.WithCancel(c.Context) @@ -65,7 +59,6 @@ func Server(cfg *config.Config) *cli.Command { http.Config(cfg), http.Metrics(m), http.Namespace(cfg.HTTP.Namespace), - http.TraceProvider(traceProvider), ) if err != nil { logger.Info(). diff --git a/services/auth-api/pkg/config/config.go b/services/auth-api/pkg/config/config.go index b371c200c5..60e8f539be 100644 --- a/services/auth-api/pkg/config/config.go +++ b/services/auth-api/pkg/config/config.go @@ -12,9 +12,8 @@ type Config struct { Service Service `yaml:"-"` - Tracing *Tracing `yaml:"tracing"` - Log *Log `yaml:"log"` - Debug Debug `yaml:"debug"` + Log *Log `yaml:"log"` + Debug Debug `yaml:"debug"` HTTP HTTP `yaml:"http"` diff --git a/services/auth-api/pkg/config/defaults/defaultconfig.go b/services/auth-api/pkg/config/defaults/defaultconfig.go index 6be01b217a..7860c2900f 100644 --- a/services/auth-api/pkg/config/defaults/defaultconfig.go +++ b/services/auth-api/pkg/config/defaults/defaultconfig.go @@ -50,17 +50,6 @@ 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{} - } if cfg.Commons != nil { cfg.HTTP.TLS = cfg.Commons.HTTPServiceTLS diff --git a/services/auth-api/pkg/config/tracing.go b/services/auth-api/pkg/config/tracing.go deleted file mode 100644 index c3e5e75a55..0000000000 --- a/services/auth-api/pkg/config/tracing.go +++ /dev/null @@ -1,21 +0,0 @@ -package config - -import "github.com/opencloud-eu/opencloud/pkg/tracing" - -// Tracing defines the available tracing configuration. -type Tracing struct { - Enabled bool `yaml:"enabled" env:"OC_TRACING_ENABLED;AUTHAPI_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"` - Type string `yaml:"type" env:"OC_TRACING_TYPE;AUTHAPI_TRACING_TYPE" desc:"The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now." introductionVersion:"1.0.0"` - Endpoint string `yaml:"endpoint" env:"OC_TRACING_ENDPOINT;AUTHAPI_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent." introductionVersion:"1.0.0"` - Collector string `yaml:"collector" env:"OC_TRACING_COLLECTOR;AUTHAPI_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset." introductionVersion:"1.0.0"` -} - -// Convert Tracing to the tracing package's Config struct. -func (t Tracing) Convert() tracing.Config { - return tracing.Config{ - Enabled: t.Enabled, - Type: t.Type, - Endpoint: t.Endpoint, - Collector: t.Collector, - } -} diff --git a/services/groupware/pkg/command/server.go b/services/groupware/pkg/command/server.go index 150329029b..4af34fa62b 100644 --- a/services/groupware/pkg/command/server.go +++ b/services/groupware/pkg/command/server.go @@ -6,7 +6,6 @@ import ( "github.com/oklog/run" "github.com/opencloud-eu/opencloud/pkg/config/configlog" - "github.com/opencloud-eu/opencloud/pkg/tracing" "github.com/opencloud-eu/opencloud/services/groupware/pkg/config" "github.com/opencloud-eu/opencloud/services/groupware/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/groupware/pkg/logging" @@ -28,11 +27,6 @@ func Server(cfg *config.Config) *cli.Command { Action: func(c *cli.Context) error { logger := logging.Configure(cfg.Service.Name, cfg.Log) - traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name) - if err != nil { - return err - } - var ( gr = run.Group{} ctx, cancel = context.WithCancel(c.Context) @@ -62,7 +56,6 @@ func Server(cfg *config.Config) *cli.Command { http.Config(cfg), http.Metrics(m), http.Namespace(cfg.HTTP.Namespace), - http.TraceProvider(traceProvider), ) if err != nil { logger.Info(). diff --git a/services/groupware/pkg/config/config.go b/services/groupware/pkg/config/config.go index 38d5e2cde0..77cf96214a 100644 --- a/services/groupware/pkg/config/config.go +++ b/services/groupware/pkg/config/config.go @@ -13,9 +13,8 @@ type Config struct { Service Service `yaml:"-"` - Tracing *Tracing `yaml:"tracing"` - Log *Log `yaml:"log"` - Debug Debug `yaml:"debug"` + Log *Log `yaml:"log"` + Debug Debug `yaml:"debug"` HTTP HTTP `yaml:"http"` diff --git a/services/groupware/pkg/config/defaults/defaultconfig.go b/services/groupware/pkg/config/defaults/defaultconfig.go index a5c0a55b6d..042ed81a5d 100644 --- a/services/groupware/pkg/config/defaults/defaultconfig.go +++ b/services/groupware/pkg/config/defaults/defaultconfig.go @@ -72,17 +72,6 @@ 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{} - } if cfg.TokenManager == nil && cfg.Commons != nil && cfg.Commons.TokenManager != nil { cfg.TokenManager = &config.TokenManager{ JWTSecret: cfg.Commons.TokenManager.JWTSecret, diff --git a/services/groupware/pkg/config/tracing.go b/services/groupware/pkg/config/tracing.go deleted file mode 100644 index 0ef623cee1..0000000000 --- a/services/groupware/pkg/config/tracing.go +++ /dev/null @@ -1,21 +0,0 @@ -package config - -import "github.com/opencloud-eu/opencloud/pkg/tracing" - -// Tracing defines the available tracing configuration. -type Tracing struct { - Enabled bool `yaml:"enabled" env:"OC_TRACING_ENABLED;GROUPWARE_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"` - Type string `yaml:"type" env:"OC_TRACING_TYPE;GROUPWARE_TRACING_TYPE" desc:"The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now." introductionVersion:"1.0.0"` - Endpoint string `yaml:"endpoint" env:"OC_TRACING_ENDPOINT;GROUPWARE_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent." introductionVersion:"1.0.0"` - Collector string `yaml:"collector" env:"OC_TRACING_COLLECTOR;GROUPWARE_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset." introductionVersion:"1.0.0"` -} - -// Convert Tracing to the tracing package's Config struct. -func (t Tracing) Convert() tracing.Config { - return tracing.Config{ - Enabled: t.Enabled, - Type: t.Type, - Endpoint: t.Endpoint, - Collector: t.Collector, - } -}