mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
Convert storage system to use service tracing.
This converts the storage system service to use a service trace provider.
This commit is contained in:
@@ -12,13 +12,13 @@ import (
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"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/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/storage-system/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/storage-system/pkg/logging"
|
||||
"github.com/owncloud/ocis/v2/services/storage-system/pkg/revaconfig"
|
||||
"github.com/owncloud/ocis/v2/services/storage-system/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/v2/services/storage-system/pkg/tracing"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -33,7 +33,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)
|
||||
traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -50,6 +50,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
runtime.RunWithOptions(rCfg, pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
runtime.WithRegistry(reg),
|
||||
runtime.WithTraceProvider(traceProvider),
|
||||
)
|
||||
|
||||
return nil
|
||||
@@ -67,7 +68,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