This example implements a simple Hello World REST service using MicroProfile, using Jaeger tracing. Note that this variation imposes a specific release of Apache Thrift to work around an API change from 0.12 to 0.13.
The application.yaml
file specifies Jaeger tracing and causes Helidon to log each transmission
of a span to Jaeger.
With JDK8+
mvn package
java -jar target/quickstart-mp-jaeger.jar
curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}
curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}
curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Hola"}' http://localhost:8080/greet/greeting
curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}
curl -s -X GET http://localhost:8080/health
{"outcome":"UP",...
. . .
# Prometheus Format
curl -s -X GET http://localhost:8080/metrics
# TYPE base:gc_g1_young_generation_count gauge
. . .
# JSON Format
curl -H 'Accept: application/json' -X GET http://localhost:8080/metrics
{"base":...
. . .
docker build -t quickstart-mp-jaeger .
docker run --rm -p 8080:8080 quickstart-mp-jaeger:latest
Exercise the application as described above
kubectl cluster-info # Verify which cluster
kubectl get pods # Verify connectivity to cluster
kubectl create -f app.yaml # Deploy application
kubectl get service quickstart-mp-jaeger # Verify deployed service