microservices-demo
microservices-demo copied to clipboard
Jaeger Trace shows only 2 spans per trace
Hi Team,
When I try to trace requests to Online Boutique Application , I can see multiple traces with two spans each. Transaction does not come as single trace. For example, If I hit the application and add a product in cart. I can see multiple traces in Jaeger - loadgenerator to frontend , frontend to productcatalog, frontend to currency and so on. There is no single trace for one transaction.
Please help me on the same. Thanks!

Same problem!
@NimJay do you know if this is intentional design, or a bug?
Sorry, I'm not too familiar with Jaegar (and logging best practices).
I'm reading up on spans and traces now.
If I understand correctly, a "span" would be a single HTTP/gRPC request, and a "trace" is a set of requests that are related. And ideally, on Online Boutique, there would be a "trace" for every user action (e.g., when the user pays for their cart), and all the related "spans" would be labelled with the correct "trace" id. Am I on the right track?
I'm looking at old GitHub PRs relevant to tracing (e.g., this), and I can't seem to find anything about implementing what I've described in the previous paragraph.
I wonder if this will be addressed when we come around to implement OpenTelemetry. I also wonder if this is something Leonid could provide some guidance on.
@minherz is that something you have insight on?
CC: @arbrown (in case you had some thoughts) More specifically, did you have thoughts about the best practices for organizing spans? Also, is my understanding correct (from my previous comment)?
@SapnaGirdhani1 can you please confirm that the trace id for all these entries is the same while the span ids are different?
Looking at the code I see that the OpenCensus framework is currently used to generate tracing logs in frontend and productcatalog while currencyservice uses Cloud Tracing client library. Getting your answer will help render out possible option that the trace id does not propagate between the calls.
Traces will be overhauled when we fix #422, and we consolidate traces from OpenCensus/Cloud tracing to be all OTel.
@SapnaGirdhani1 requesting more information to help us resolve the issue for you.
Additionally, bringing visibility to an initiative under consideration to remove Jaeger from microservices-demo repo in favor of showcasing Google Cloud Operations.
https://github.com/GoogleCloudPlatform/microservices-demo/issues/947
FYI: Jaeger support will be removed by #1088.
Closing this one as Jaeger has been removed from the project: https://github.com/GoogleCloudPlatform/microservices-demo/pull/1088, coming in 0.3.10.