microservices-demo icon indicating copy to clipboard operation
microservices-demo copied to clipboard

Jaeger Trace shows only 2 spans per trace

Open SapnaGirdhani1 opened this issue 3 years ago • 8 comments
trafficstars

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

SapnaGirdhani1 avatar Nov 25 '21 10:11 SapnaGirdhani1

Same problem!

Fengrui-Liu avatar Feb 15 '22 09:02 Fengrui-Liu

@NimJay do you know if this is intentional design, or a bug?

bourgeoisor avatar Jun 21 '22 17:06 bourgeoisor

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.

NimJay avatar Jun 21 '22 21:06 NimJay

@minherz is that something you have insight on?

bourgeoisor avatar Jun 21 '22 22:06 bourgeoisor

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

NimJay avatar Jul 26 '22 16:07 NimJay

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

minherz avatar Aug 10 '22 20:08 minherz

Traces will be overhauled when we fix #422, and we consolidate traces from OpenCensus/Cloud tracing to be all OTel.

arbrown avatar Aug 29 '22 17:08 arbrown

@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

ahrarmonsur avatar Sep 12 '22 10:09 ahrarmonsur

FYI: Jaeger support will be removed by #1088.

mathieu-benoit avatar Sep 27 '22 13:09 mathieu-benoit

Closing this one as Jaeger has been removed from the project: https://github.com/GoogleCloudPlatform/microservices-demo/pull/1088, coming in 0.3.10.

mathieu-benoit avatar Oct 03 '22 14:10 mathieu-benoit