When we call the add service on the service consumer, it will invoke Microservice A through API Gateway. To be able to track the service call across different components, we would need something unique assigned to the request flow across components.
Spring Cloud Sleuth provides options to track a service call across different components using a concept called span. Each span has a unique 64-bit ID. The unique ID can be used to trace the call across components.
The following snippet shows the dependency for spring-cloud-starter-sleuth:
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-sleuth</artifactId> </dependency>
We need to add the preceding ...