mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-14 08:09:55 -06:00
add tracing
This commit is contained in:
@@ -70,6 +70,10 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
},
|
||||
)
|
||||
|
||||
logger.Info().
|
||||
Str("collector", cfg.Tracing.Collector).
|
||||
Msg("Trace collector added")
|
||||
|
||||
if err != nil {
|
||||
logger.Error().
|
||||
Err(err).
|
||||
@@ -137,8 +141,8 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
http.Context(ctx),
|
||||
http.Config(cfg),
|
||||
http.Metrics(metrics),
|
||||
http.Flags(flagset.RootWithConfig(cfg)),
|
||||
http.Flags(flagset.ServerWithConfig(cfg)),
|
||||
http.Flags(flagset.RootWithConfig(config.New())),
|
||||
http.Flags(flagset.ServerWithConfig(config.New())),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -57,6 +57,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Value: false,
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"OCS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
|
||||
Reference in New Issue
Block a user