go-zero
go-zero copied to clipboard
feat: add rest(HTTP) call trace propagation convenience method
I looked through the source code and found that go-zero implements the propagation of calls between gRPCs through metadata.
-
But the Rest HTTP call propagation seems to be lacking. I think that in some cases, we may use HTTP to call some third-party services or other internal services.
-
At this time, we also need to propagate context in order to ensure the integrity of the trace.
-
of course, we can complete the trace context building step at the logic layer, but I think this is not suitable. In the logic layer, you should not write too much code outside of the logic.
So I have a good suggestion. I hope to provide the encapsulation code of HTTP propagation in the trace package, which can make it easier to assemble the context of the propagation trace. I've written a PR code, but I'm not sure if go-zero needs this feature. Therefore raise this issue
Would you please submit a PR? And we can have a discussion on this.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.