O'Reilly logo

Hands-On Enterprise Java Microservices with Eclipse MicroProfile by Scott Stark, Antoine Sabot-Durand, Pavol Loffay, Jeff Mesnil, Heiko W. Rupp, Cesar Saavedra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Explicit instrumentation

Sometimes, the automatic instrumentation does not capture all critical timing information and, therefore, additional trace points are needed. For example, we would like to trace an invocation of a business layer or initialize third-party instrumentation provided by the OpenTracing project (https://github.com/opentracing-contrib).

The explicit instrumentation can be done in three ways:

  • Add the @Traced annotation on Context and Dependency Injection (CDI) beans.
  • Inject the tracer and create spans manually.
  • Initialize third-party instrumentation. The initialization of external instrumentation depends on its own initialization requirements. MicroProfile just has to provide a tracer instance, which is covered in the previous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required