-
Notifications
You must be signed in to change notification settings - Fork 905
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
Missing context propagation using Istio #2890
Comments
hi @wtcampos! can you try with the latest SNAPSHOT build? https://oss.sonatype.org/content/repositories/snapshots/io/opentelemetry/javaagent/opentelemetry-javaagent/1.2.0-SNAPSHOT/opentelemetry-javaagent-1.2.0-20210428.035324-7.jar if it's still an issue in the latest SNAPSHOT build, it would be most helpful if you can create a github repository with a repro of the issue |
Hello @trask thanks for the quick reply, I will try the latest version and if it does not solve the problem I will reproduce it in another GH repo. |
Hello @trask after some debugging we found out the problem is when |
oh, sorry, just saw this here, should we consolidate this discussion with #2909? |
Yes, please do it. |
sure, let's discuss on this issue, since it has the most context so far. can you clarify, what Java framework is being used on the client and server side where context is not being propagated correct across http2? and whether you are seeing context propagation always failing in this scenario, or sporadically failing? thx! |
It's not working at all, I'm using the current instrumentation implemented on Istio and I set Using HTTP2 to set the communication on the sidecar, the traces are broken: And every span it's like a new trace: If I change the service name on K8s from HTTP2 to HTTP changing the protocol selection https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/ I was checking the headers on logs and we some 3 different headers:
Please let me know if I can provide further information |
It may be related to #2496. Are you using a higher level framework on top of netty (e.g. spring webflux)? Are you using netty on the client side also? any higher level framework on top of netty on the client side (e.g. spring webclient)? |
Yes, I'm using |
Ya, see #2496, in particular the comment about request pipelining. |
I'm not sure if it's related, because in my case it's working with HTTP1.1 and I don't have this problem with concurrency anytime, I did a quick test using Tomcat also and I got the same problem using HTTP2 and it was synchronous connection, may is related how Envoy deals with the service connection. I will take a look further. Thanks for your help. |
hi @wtcampos @danhngo-lx are you still having this issue? curious if it's maybe resolved in a recent javaagent version, and/or if you could provide a repro that we could use to investigate? |
@trask It's solved for me in newer version of javaagent since my comment |
Describe the bug
Missing context propagation using service mesh Istio.
Steps to reproduce
Using the auto instrumentation agent, the context propagation is missing when I do a call through Istio Gateway as Ingress, it looks very similar to #2229 .I'm using the latest version from the agent
v.1.1.0
and the application is also using WebClient/Netty. I tried using a RestTemplate and I couldn't reproduce the problem, it's working fine with RestTemplate. What I could see in the logs is:There's one error regarding an invalid span context TraceId in B3 header:
And also some invalid traces ids:
If I do a GET directly to the pod running using
kubectl port-forward
the tracing looks good, but if I use the service mesh and do the same GET via Istio, the traces are broken and not correctly propagated.I'm using the
b3multi
as propagation to work with Istio.What did you expect to see?
The traces right propagated from the Ingress until the application.
What did you see instead?
The full trace right propagated.
What version are you using?
v.1.1.0
Environment
Compiler:
OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9, mixed mode, sharing)
K8s:
v1.19
OS:
Debian GNU/Linux 10 (buster)
Docker image:openjdk:11
Runtime :
OpenJDK Runtime Environment 18.9 (build 11.0.11+9)
Additional context
Also happened with
v1.0.1
. And it looks like the issue is with the libraryio.opentelemetry.javaagent.netty-4.1
, since I don't have any issue withio.opentelemetry.javaagent.apache-httpclient-4.0
.Please let me know if I can provide further information.
The text was updated successfully, but these errors were encountered: