mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
Change groups service to use service traceprovider (#6800)
This changes the groups service to use the service traceprovider.
This commit is contained in:
@@ -13,13 +13,13 @@ import (
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/ldap"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/tracing"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/logging"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/revaconfig"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/tracing"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
err := tracing.Configure(cfg, logger)
|
||||
tracingProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -63,6 +63,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
runtime.RunWithOptions(rCfg, pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
runtime.WithRegistry(reg),
|
||||
runtime.WithTraceProvider(tracingProvider),
|
||||
)
|
||||
|
||||
return nil
|
||||
@@ -80,7 +81,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().Err(err).Str("server", "debug").Msg("Failed to initialize server")
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user