Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The section dedicated to Apache HTrace has pretty good introduction into distributed tracing, however Micrometer Observation uses own, more generic, terminology and provides the general APIs to denote the Observation lifecycle (which somewhat is analogous to Span) and injection points to propagate the context across many distributed components. As such, the intrinsic details about HTTP headers f.e. becomes an integral part of the distributed tracer of your choice, out of reach for Apache CXF.

Info

Micrometer Tracing provides a simple facade for the most popular tracer libraries, letting to implement the instrumentation of the JVM-based application code without vendor lock-in. It is designed to add little to no overhead to the tracing collection activity while maximizing the portability of the tracing efforts.

Distributed Tracing in Apache CXF using Micrometer Observation

...

  • ObservationStartInterceptor / ObservationStopInterceptor / ObservationFeature Apache CXF feature (server-side JAX-WS support)
  • ObservationClientStartInterceptor / ObservationClientStopInterceptor / ObservationClientFeature Apache CXF feature (client-side JAX-WS support)

Apache CXF uses HTTP headers to hand off tracing context from the client to the service and from the service to service. Those headers are specific to distributing tracing framework you have picked and are not configurable at the moment (unless the framework itself has a way to do that).

By default, ObservationClientProvider will use configured propagators to pass the currently active observation through HTTP headers on each service invocation. If there is no active observations, the new observation will be created and passed through HTTP headers on per-invocation basis. Essentially, for JAX-RS applications just registering ObservationClientProvider on the client and ObservationProvider on the server is enough to have tracing context to be properly passed everywhere. The only configuration part which is necessary are span reporter(s) / exporter(s) and sampler(s) which are, not surprisingly, specific to distributing tracing bridge you have chosen.