Tracing with Jaeger

Jaeger is an open source tool (https://jaegertracing.io) that recently graduated from the CNCF project. It provides distributed transaction monitoring, service dependency information, and span tracing using an open standard specification (https://github.com/opentracing/specification). Let's take a look at how to perform tracing with Jaeger:  

  1. Open http://jaeger.istio.io and use admin/admin as the user ID and password. 

If the curl command for driving traffic has stopped in the command-line window, start it again in order to send traffic to the productpage.

  1. Select the productpage.istio-lab service from the drop-down and click Find Traces:  

The graph shows the duration, while the bottom section shows the data that has been collected from productpage tracings
  1. Click on the productpage.istio-lab.svc.cluster.local service and visualize the distributed trace:

Notice the 73 ms end-to-end response time of the request (see the top bar of the Service & Operation panel), which arrived at istio-ingressgateway. The staggered bars and labels on the left-hand side of the panel show the elapsed time in each microservice. This helps us clearly see the amount of time that was spent in each dependent microservice.

From this, it is evident that if we optimize the details microservice, it will reduce the overall end-to-end response time. This is an example of important observation derived through Jaeger. Note that the sample BookInfo application propagates the span headers from the sidecar proxy. Subsequently, the next upstream sidecar creates a child span. If the application does not propagate headers, all the spans that are built will be root spans, and they will be aligned to the left.

Click on any service and expand the Tag section. Notice the value of span.kind. It should be a client if header propagation is allowed through the application; otherwise, each span.kind will show up as a server

  1. Click Dependencies and then DAG (short for Directed Acyclic Graph) to see the dependencies among services. Note that, as expected, the number of invocations from the productpage to the details and reviews microservices is identical (46046):

  1. Go to Search again, select the istio-mixer service, and click Find Traces. Select the latest trace (showing 12 spans):

Notice the elapsed time that was spent on the istio-mixer level, which is negligible compared to the end-to-end time for the productpage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.53.209