DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Example #1: Client and Server with default distributed tracing configured
In the first example we are going to see the effect of using default configuration on the client and on the server, with only BraveClientProvider and BraveProvider registered. The JAX-RS resource endpoint is pretty basic stubbed method:
| Code Block | ||||
|---|---|---|---|---|
| ||||
@Produces( { MediaType.APPLICATION_JSON } )
@GET
public Collection<Book> getBooks() {
return Arrays.asList(
new Book("Apache CXF Web Service Development", "Naveen Balani, Rajeev Hathi")
);
} |
The client is as simple as that:
| Code Block | ||||
|---|---|---|---|---|
| ||||
final Response response = client
.target("http://localhost:8282/books")
.request()
.accept(MediaType.APPLICATION_JSON)
.get(); |
The actual invocation of the request by the client (with process name tracer-client) and consequent invocation of the service on the server side (process name tracer-server) is going to generate the following sample traces:
Example #2: Client and Server with nested trace
...