diff --git a/cluster.go b/cluster.go index e698320..12c847d 100644 --- a/cluster.go +++ b/cluster.go @@ -448,7 +448,7 @@ func (c *Cluster) doTask(ctx context.Context, taskId string) { } }() - ctx = context.WithValue(ctx, "trace_id", uuid.NewV4().String) + ctx = context.WithValue(ctx, "trace_id", uuid.NewV4().String()) // 执行任务 t.Callback(ctx, t.ExtendData) diff --git a/single.go b/single.go index f616e05..ff82e8c 100644 --- a/single.go +++ b/single.go @@ -288,7 +288,7 @@ func (s *Single) doTask(ctx context.Context, call func(ctx context.Context, exte } }() - ctx = context.WithValue(ctx, "trace_id", uuid.NewV4().String) + ctx = context.WithValue(ctx, "trace_id", uuid.NewV4().String()) return call(ctx, extend) }