Request Tracing

David R. Heffelfinger · Apress eBooks · 2022

A typical microservices architecture consists of several microservices. These services send output to a log file; traditionally, each service sends output to its own log file. When looking at log files across server instances, it is almost never trivial to follow a single trace of execution across our microservices; for example, let’s say we have two services, A and B, and that service A serves as a client for service B. Typically, we will see several calls to service B from service A in the logs, but it is seldom trivial to match which calls from service A match which calls received from service B. Additionally, it is possible service B may be called from clients other than service A, making following a single trace of execution in our application a challenging task. This is where the MicroProfile OpenTracing API comes in; this API generates spans and traces that allow us to trace execution across Payara Micro instances; each span and trace has a unique ID that does not change across instances, allowing us to link log entries from one instance of Payara Micro to another.

Read the paper · More papers on PaperTik