The environment is the following:
-
Demo apps:
-
OpenTelemetry Collector
-
Jaeger
-
Prometheus
-
Apache Kafka (for async communication between apps cases)
You will need to compile this example first:
mvn compile
All the following docker compose commands should be run from this directory.
You may want to remove any old containers to start cleaning:
docker rm -f kafka zookeeper prometheus jaeger otel-collector
We suggest using multiple terminal windows to start the following components:
-
Infrastructure components
-
Demo apps
-
TripBooking
-
FlightBooking
-
HotelBooking
-
CarBooking
-
-
Testing for sending HTTP requests
Please use four different shells for each application:
You can use any HTTP client (web browser, curl, httpie, postman etc.) for testing purposes.
-
Prometheus UI: http://localhost:9090/graph
-
Jaeger UI: http://localhost:16686
MDC Logging is enabled, and tracing information printing into the logs to be able to find corresponding trace logs entries. For example:
...
11:52:18.923 INFO [d02a363f16e88d9f012a36563b5464f5,9a328d33319645ab] bookTrip-http - New book trip request with trace=00-d02a363f16e88d9f012a36563b5464f5-9570717e10d38afa-01
11:52:18.931 INFO [d02a363f16e88d9f012a36563b5464f5,9a328d33319645ab] bookTrip-http - Response: [{"bookingId":82,"car":"Volkswagen Jetta","startDate":"12-11-2018","endDate":"15-11-2018","price":152}, {"bookingId":907,"flight":"China Eastern Airlines 2782","startDate":"12-11-2018","endDate":"15-11-2018","price":133}, {"bookingId":926,"hotel":"Sheraton","startDate":"12-11-2018","endDate":"15-11-2018","price":200}]
...
If you hit any problem using Camel or have some feedback, then please let us know.
We also love contributors, so get involved :-)
The Camel riders!