This example is a very simple application running on Thorntail that exposes a service on http://localhost:8080. The application is instrumented using the client_java library.
It offers 2 endpoints:
/helloresponding200 OKwithHello from Thorntail!. The endpoint adds a random delay to generate different response times. From time to time, it will fail with500 SERVER UNAVAILABLE./metricsexposing the Prometheus metrics.
mvn thorntail:runVisit http://localhost:8080/hello a couple of times. Then go to http://localhost:8080/metrics to view the metrics.
The API documentation is available at (http://prometheus.github.io/client_java/).