Monday, January 8, 2024

Distributed tracing

 Problem

In microservice architecture, requests often span multiple services. Each service handles a request by performing one or more operations across multiple services. Then, how do we trace a request end-to-end to troubleshoot the problem?

Solution

We need a service which

  • Assigns each external request a unique external request id.
  • Passes the external request id to all services.
  • Includes the external request id in all log messages.
  • Records information (e.g. start time, end time) about the requests and operations performed when handling an external request in a centralized service.

Spring Cloud Slueth, along with Zipkin server, is a common implementation.

No comments:

Post a Comment