fix: cross-service trace issues

This commit is contained in:
zhuyasen
2022-12-06 23:42:31 +08:00
parent 675850e2b2
commit 1ed51c8810
43 changed files with 160 additions and 91 deletions

View File

@@ -40,7 +40,7 @@ func Config() {
model.InitCache(cfg.App.CacheType)
// initializing tracing
if cfg.App.EnableTracing {
if cfg.App.EnableTrace {
tracer.InitWithConfig(
cfg.App.Name,
cfg.App.Env,

View File

@@ -33,7 +33,7 @@ func RegisterClose(servers []app.IServer) []app.Close {
}
// close tracing
if config.Get().App.EnableTracing {
if config.Get().App.EnableTrace {
closes = append(closes, func() error {
ctx, _ := context.WithTimeout(context.Background(), 2*time.Second) //nolint
return tracer.Close(ctx)