Skip to content

Commit

Permalink
fix(sdk): goroutine display stack (#6398)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesnault authored Jan 2, 2023
1 parent 1846ecd commit 987162f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/goroutine.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (m *GoRoutines) exec(g *GoRoutine) {
defer func() {
if r := recover(); r != nil {
buf := make([]byte, 1<<16)
runtime.Stack(buf, false)
buf = buf[:runtime.Stack(buf, false)]
ctx = context.WithValue(ctx, cdslog.Stacktrace, string(buf))
log.Error(ctx, "[PANIC][%s] %s failed", hostname, g.Name)
}
Expand Down

0 comments on commit 987162f

Please sign in to comment.