Skip to content

Commit

Permalink
Merge pull request moby#2903 from deitch/with-return-traces
Browse files Browse the repository at this point in the history
Add return stack traces
  • Loading branch information
tonistiigi authored Jun 13, 2022
2 parents a3c1c8c + 065dcb2 commit b521369
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/buildkitd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,10 @@ func unaryInterceptor(globalCtx context.Context, tp trace.TracerProvider) grpc.U

resp, err = withTrace(ctx, req, info, handler)
if err != nil {
logrus.Errorf("%s returned error: %+v", info.FullMethod, stack.Formatter(err))
logrus.Errorf("%s returned error: %v", info.FullMethod, err)
if logrus.GetLevel() >= logrus.DebugLevel {
fmt.Fprintf(os.Stderr, "%+v", stack.Formatter(grpcerrors.FromGRPC(err)))
}
}
return
}
Expand Down

0 comments on commit b521369

Please sign in to comment.