Versions Compared

Key

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

...

It is also worth to mention the way Apache CXF attaches the description to observations (spans). With regards to the client integration, the description becomes a full URL being invoked prefixed by HTTP method, for example: GET http://localhost:8282/books. On the server side integration, the description becomes a relative JAX-RS resource path prefixed by HTTP method, f.e.: GET books, POST book/123

Configuring Client

...

There are a couple of ways the JAX-RS client could be configured, depending on the bridge you want to use (see please Configuring with Micrometer Observation). Apache CXF provides its own WebClient which could be configured just like that (in future versions, there would be a simpler ways to do that using client specific features):

Code Block
java
java
final final ObservationRegistry observationRegistry = ObservationRegistry.create();

final Tracer tracer = <create tracer using tracing bridge>;
final Propagator propagator = <create propagator using tracing bridge;
  
observationRegistry.observationConfig().observationHandler(
    new FirstMatchingCompositeObservationHandler(
        new PropagatingSenderTracingObservationHandler<>(tracer, propagator),
        new PropagatingReceiverTracingObservationHandler<>(tracer, propagator)
    )
);
                   
Response response = WebClient
    .create("http://localhost:9000/catalog", Arrays.asList(new ObservationClientProvider(observationRegistry))
    .accept(MediaType.APPLICATION_JSON)
    .get();


Configuring Server

TBD

Distributed Tracing In Action: Usage Scenarios

...