-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate Tracing Headers in ext_proc #21119
Comments
From what I understand, tracing span for streaming grpc call was not implemented during #1885. |
cc @snowp |
So do you mean that you want to add tracing support of grpc rqeuests self? |
Yes, span should begin with the start of the stream and should end at the end of it. And a child span can be created in the filter to align with how ext_authz is doing it. Use the header from the request as parent span seems not right as envoy may have create child span itself. Maybe a new span be created for each message in the stream and pass as metadata also but it seems that gRPC tracing interceptor are not working this way. At least, https://github.com/opentracing-contrib/java-grpc/blob/master/src/main/java/io/opentracing/contrib/grpc/TracingServerInterceptor.java, is just creating a span for the whole stream and adding logs. |
I tried to set the |
This is because Envoy inject the tracing headers at the last of request header processing. So you get nothing in the ext_proc. |
Looks like this is a general issue for the external grpc requests. But sorry I have no enough bandwidth for this recently. 😞 I will mark this help wanted. |
@wbpcode would love to get my hands dirty on this, but don't really know where to start - wanna give me a hand? |
@xvzf It seems like the reason lies in the fact that I ain't no gRPC expert, but it appears to me that with streaming, you only send the headers once and not per message, so perhaps what needs to happen is In the We were thinking to work-around this by adding a Lua filter at the beginning of the filter chain, that will inject tracing header(s) with our manually generated IDs, so that we can reference it through |
cc @xvzf sorry for the delayed respnose. I almost forget this PR. But I think @nahk-ivanov has given a great explanation about this work. |
It's been some time since the last comment. Is there an update on this issue? We're transitioning from Lua filters to exproc, but it appears that traces are still not being propagated to the grpc server. |
I'm really interested on this and decided to take a stab #33665. Thank you for the very detailed pointers @nahk-ivanov, it was sufficient for one with no prior C++ knowledge to follow. I would appreciate any review. |
@cainelli LEGEND!!!! |
Following up on #33665, which adds tracing to Envoy gRPC streams, this PR introduces the same support using Google gRPC for completeness to #21119. Risk Level: Low Testing: The same manual tests described in #33665, besides the integration tests of extproc are also testing google grpc now. Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com>
…proxy#34395) Following up on envoyproxy#33665, which adds tracing to Envoy gRPC streams, this PR introduces the same support using Google gRPC for completeness to envoyproxy#21119. Risk Level: Low Testing: The same manual tests described in envoyproxy#33665, besides the integration tests of extproc are also testing google grpc now. Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com> Signed-off-by: Neal Soni <Nealsoni00@gmail.com>
coming after the war but @cainelli thanks a lot for this work !!! |
Title: B3 headers should be propagated to the gRPC context call
Description:
[optional Relevant Links:]
The text was updated successfully, but these errors were encountered: