Exercise 1 – the Hello application

In the first exercise, we are going to run a simple, single-process "Hello" application, and review its source code, so that we can later instrument it for distributed tracing. The application is implemented as a web service, which we can access by sending it HTTP requests like this:

$ curl http://localhost:8080/sayHello/John
Hello, John!

$ curl http://localhost:8080/sayHello/Margo
Hello, Margo!

The application has some creepy big brother tendencies, however, by occasionally volunteering additional knowledge about the person:

$ curl http://localhost:8080/sayHello/Vector
Hello, Vector! Committing crimes with both direction and magnitude!

$ curl http://localhost:8080/sayHello/Nefario
Hello, Dr. Nefario! Why ... ...

Get Mastering Distributed Tracing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.