Eclipse MicroProfile OpenTracing
Payara Platform 6.2022.2 provides MicroProfile OpenTracing 3.0
Background
The Open Tracing API was created to allow easier tracing of the flow of a request in microservices environment across service boundaries.
The complete specification can be found on the Eclipse MicroProfile website.
Breaking changes introduced in MicroProfile OpenTracing 3.0 are listed in the official specification under Incompatible Changes
Text and Binary Carriers Support
The Payara Platform implementation of the io.opentracing.Tracer
interface supports the following carriers:
-
TextMap
carriers withHTTP_HEADERS
andTEXT_MAP
formats
JAX-WS Support
The Payara Platform’s MicroProfile implementation supports tracing of requests that are handled by SOAP Web Services implemented via the JAX-WS API. Since JAX-WS is only supported on Payara Server Full Profile, this support is not covered on Payara Micro.
OpenTracing Configuration
You can configure the notifiers and the Request Tracing service as documented in the Administering the Request Tracing Service section.
Using Alternate OpenTracing Implementations
If you wish to use an alternative implementation of OpenTracing, i.e. Jaeger, then the alternative implementation must be provided as a jar in the lib directory of your domain. In it must be a file named io.opentracing.Tracer
under META-INF/services, with the name of the class implementing io.opentracing.Tracer
. That implementation must have a no-argument constructor. Alternate Opentracing implementations will only trace JAX-RS, JAX-WS and classes or methods annotated with @Traced
; Payara Server’s own request tracing service can trace more types of request.
All other options for request tracing are ignored as the created Spans are not processed within the server runtime. |
As an example, see https://github.com/payara/ecosystem-jaeger-tracing, which shows how to integrate a Jaeger client tracer. This can be added as a library to Payara with the command add-library jaeger-tracer-lib-with-dependencies
. Enabling request tracing in Payara Server is then required, which will then send traces from OpenTracing to a Jaeger collector on the same host.