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
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