🏆 Take the free Top-Rated Session from TechXchange in Las Vegas and Build Your First GenAI Application the Right Way! Learn more

Offered By: IBM

Enabling distributed tracing in Java microservices using Eclipse MicroProfile OpenTracing and the Jaeger tracing system.

Explore how to enable and customize tracing of JAX-RS and non-JAX-RS methods by using MicroProfile OpenTracing and Jaeger.

Continue reading

Guided Project

Open Liberty

59 Enrolled

At a Glance

Explore how to enable and customize tracing of JAX-RS and non-JAX-RS methods by using MicroProfile OpenTracing and Jaeger.

You will learn how to enable automatic tracing for JAX-RS methods and create custom tracers for non-JAX-RS methods by using MicroProfile OpenTracing.
OpenTracing is a standard API for instrumenting microservices for distributed tracing. Distributed tracing helps troubleshoot microservices by examining and logging requests as they propagate through a distributed system, allowing developers to tackle the otherwise difficult task of debugging these requests.

Without a distributed tracing system in place, analyzing the workflows of operations becomes difficult, particularly in regard to pinpointing when and by whom a request is received or when a response is sent back.
Tracer and Span are two critical types in the OpenTracing specification. The Span type is the primary building block of a distributed trace, representing an individual unit of work done in a distributed system. The Trace type in OpenTracing can be thought of as a directed acyclic graph (DAG) of Spans, where the edges between Spans are called References. The Tracer interface creates Spans and Traces and understands how to serialize and deserialize their metadata across process boundaries.

MicroProfile OpenTracing enables distributed tracing in microservices. The MicroProfile OpenTracing specification doesn’t address the problem of defining, implementing, or configuring the underlying distributed tracing system. Rather, the specification makes it easier to instrument services with distributed tracing given an existing distributed tracing system.
Jaeger is an open source distributed tracing system that is compatible with the OpenTracing specification. Jaeger also provides an implementation of Tracer in the client package that is compatible with MicroProfile OpenTracing.

You’ll configure the provided inventory and system services to use Jaeger for distributed tracing with MicroProfile OpenTracing. You’ll run these services in two separate JVMs made of two server instances to demonstrate tracing in a distributed environment. If all the components were run on a single server, then any logging software would be sufficient.

Created by 

The Open Liberty Project team

Estimated Effort

1 Hour

Level

Intermediate

Skills You Will Learn

Java

Language

English

Course Code

GPXX0JLHEN

Tell Your Friends!

Saved this page to your clipboard!

Have questions or need support? Chat with me 😊