Dongxun Yin
Dongxun Yin
@linchao0815 我会 Fork 你的例子,然后做一些修改。 在执行 go run httpclient.go 的时候开始,就生成一个 Trace,然后进行追踪。
@linchao0815 这里是我 Fork 了你的项目之后,做的修改,可以参考一下。 https://github.com/dongxuny/grpc_asynq 效果如下图:  
@linchao0815 根据描述,更新了例子。https://github.com/dongxuny/grpc_asynq 新的例子里,发送 second-enqueue 之前,不会等待 first-enqueue Task 结束。TraceID 在整个生命周期里是唯一的,span.SpanContext().TraceID().String() 这个函数可以在任何地方得到一摸一样的 TraceID。  
@linchao0815 好的,我先了解一下 https://github.com/linchao0815/protoc-gen-go-asynqgen,然后,试一下。
@linchao0815 按照你的思路改了一下 [protoc-gen-go-asynqgen](https://github.com/dongxuny/protoc-gen-go-asynqgen) 代码逻辑解释起来有些复杂,简单来说:把 Trace 信息复制过来,复制过去的过程。可以参考一下例子。 这是应用例子:https://github.com/dongxuny/grpc_asynq
@linchao0815 grpc 里 ignore 应该用 grpc 的Path,我给你个例子吧。
@linchao0815 这是 ignore 日志的例子,trace 的 ignore 也一样。 https://github.com/rookie-ninja/rk-demo/tree/master/grpc/v2/ignore-middleware gRPC 得用 gRPC 的 Path。 
@linchao0815 ignore 只会忽略 jaeger,不会影响 API 的调用。你的这个错误是从哪里出来的?有全部的 Stack trace 吗? 或者把你的 boot.yaml 配置发一下。
@linchao0815 我重新写了个 trace ignore 的例子,可以对比一下哈。 https://github.com/rookie-ninja/rk-demo/tree/master/grpc/v2/ignore-middleware
@linchao0815 rk-entry 有一个很隐蔽的 Bug,修好了。并且把 rk-xxx 其他 package 的版本也升级了一下。我用你的例子验证了一下,不会再抛出 Panic 了。 升级成下面的版本应该就 OK,可以验证一下。 