August 2019
Intermediate to advanced
256 pages
6h 43m
English
The OpenTracing tab shows the following view with two links:

The first link accesses the following io.packt.sample.tracing.TracedEndpoint method:
@GET@Path("/randomDelay")@Produces(MediaType.TEXT_PLAIN)@Traced(operationName = "TracedEndpoint#demoRandomDelay")public String randomDelay() { long start = System.currentTimeMillis(); // 0-5 seconds random sleep long sleep = Math.round(Math.random() * 5000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } long end = System.currentTimeMillis(); return String.format("TracedEndpoint.randomDelay[0-5000], elapsed=%d", (end - start));}
The method ...
Read now
Unlock full access