mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-10-07 01:33:14 +08:00
fix: cross-service trace issues
This commit is contained in:
@@ -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,
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user