fix missing trace id in gctx.GetInitCtx (#2562)

This commit is contained in:
John Guo
2023-04-12 10:35:24 +08:00
committed by GitHub
parent c1325ef9a3
commit 5f148632d2
5 changed files with 5 additions and 4 deletions

View File

@ -21,5 +21,5 @@ var (
)
func main() {
Main.Run(gctx.New())
Main.Run(gctx.GetInitCtx())
}

View File

@ -20,5 +20,5 @@ var (
)
func main() {
Sub.Run(gctx.New())
Sub.Run(gctx.GetInitCtx())
}

View File

@ -7,7 +7,7 @@ import (
)
func main() {
ctx := gctx.New()
ctx := gctx.GetInitCtx()
g.Log().Debug(ctx, `this is main process`)
if err := gproc.ShellRun(ctx, `go run sub/sub.go`); err != nil {
panic(err)

View File

@ -6,6 +6,6 @@ import (
)
func main() {
ctx := gctx.New()
ctx := gctx.GetInitCtx()
g.Log().Debug(ctx, `this is sub process`)
}