Dongxun Yin

Results 44 comments of Dongxun Yin

@linchao0815 我会 Fork 你的例子,然后做一些修改。 在执行 go run httpclient.go 的时候开始,就生成一个 Trace,然后进行追踪。

@linchao0815 这里是我 Fork 了你的项目之后,做的修改,可以参考一下。 https://github.com/dongxuny/grpc_asynq 效果如下图: ![image](https://user-images.githubusercontent.com/50768414/191582657-eff84eb6-79c5-49c6-b77a-904c0b6d6a08.png) ![image](https://user-images.githubusercontent.com/50768414/191582770-a5d678de-106a-4021-833a-c08688f93749.png)

@linchao0815 根据描述,更新了例子。https://github.com/dongxuny/grpc_asynq 新的例子里,发送 second-enqueue 之前,不会等待 first-enqueue Task 结束。TraceID 在整个生命周期里是唯一的,span.SpanContext().TraceID().String() 这个函数可以在任何地方得到一摸一样的 TraceID。 ![image](https://user-images.githubusercontent.com/50768414/191721899-a06d9d41-8219-4584-aa35-ed8cefb746d6.png) ![image](https://user-images.githubusercontent.com/50768414/191722024-5b3a4a0f-07f6-4153-8091-591628871370.png)

@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。 ![image](https://user-images.githubusercontent.com/50768414/196455502-71fb7f37-378d-4d8c-907f-53bbe74ddea4.png)

@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,可以验证一下。 ![image](https://user-images.githubusercontent.com/50768414/197012891-4a246fc9-7fed-49b9-94e3-51a6c15cd3e1.png)