In this series of liveProjects, you’ll deploy distributed tracing to help an eCommerce company manage its new microservices infrastructure. You’ve just been hired by eShop, a rapidly growing company that adopted microservices due to the flexibility they provide developers. eShop is finding that managing and troubleshooting its ever-increasing number of microservices is a challenge, and so your task is to use distributed tracing to develop a high-level picture of requests across these microservices. You’ll implement distributed tracing using Jaeger, Kubernetes, and Istio. Each liveProject in this series can be tackled individually, or as part of an extended learning experience.
In this liveProject, you’ll use the Istio service mesh to automatically generate tracing spans for the microservices in the eCommerce application. Istio installs a sidecar proxy for each microservice that runs in the service mesh. That proxy intercepts the HTTP requests between microservices, generating a span for each request. This method avoids the need to write large amounts of tracing code, and is an excellent choice when working with legacy systems or small development teams.
In this liveProject, you’ll restructure the demo application as multiple microservices and instrument distributed tracing for each of them. You’ll combine spans from those microservices to create an end-to-end trace of the system—perfect for monitoring your app activity. Finally, you’ll explore using baggage to pass context data through the call graph.
In this liveProject, you’ll instrument tracing in multiple functions of a call flow inside a single microservice. By instrumenting multiple trace functions, the generated traces are far more meaningful than just a single function. Once you’ve established your tracing code, you’ll use a thread-local mechanism to pass the current active span to the next function so that the spans can be pieced together. Finally, you’ll generate a trace having spans in it representing each function the request goes through.
In this liveProject, you’ll instrument tracing inside a single microservice. You’ll use Spring Boot to first construct your microservice, and then use the OpenTracing API and Jaeger client library to generate traces and send data to the backend Jaeger server. What we create in this project will form a foundation for later projects in the series.